14 lines
424 B
Python
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)
|