PCv5/app/routes/admin/attachments.py
Darks 56a584c535
attachments: added attachments system
Still need some work on it…
2020-08-01 21:26:06 +02:00

14 lines
424 B
Python

from app import app
from app.models.attachment import Attachment
from app.utils.priv_required import priv_required
from app.utils.render import render
# TODO: add pagination & moderation tools (deletion)
@app.route('/admin/fichiers', methods=['GET'])
@priv_required('access-admin-panel')
def adm_attachments():
attachments = Attachment.query.all()
return render('admin/attachments.html', attachments=attachments)