PCv5/app/routes/admin/polls.py

12 lines
348 B
Python

from app import app
from app.utils.priv_required import priv_required
from app.utils.render import render
from app.models.poll import Poll
@app.route('/admin/sondages', methods=['GET'])
@priv_required('access-admin-panel')
def adm_polls():
polls = Poll.query.order_by(Poll.end.desc()).all()
return render('admin/polls.html', polls=polls)