PCv5/app/routes/programs/index.py

9 lines
281 B
Python

from app import app, db
from app.models.program import Program
from app.utils.render import render
@app.route('/programmes')
def program_index():
programs = Program.query.order_by(Program.date_created.desc()).all()
return render('/programs/index.html', programs=programs)