com
This commit is contained in:
parent
354f365c48
commit
1491e05091
@ -1,7 +1,10 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
import wtforms as wtf
|
import wtforms as wtf
|
||||||
from flask import url_for, request
|
from flask import url_for, request
|
||||||
from flask_admin import Admin, AdminIndexView, expose
|
from flask_admin import Admin, AdminIndexView, expose
|
||||||
from flask_admin.contrib import sqla
|
from flask_admin.contrib import sqla
|
||||||
|
from flask_admin.contrib import fileadmin
|
||||||
from flask_admin.menu import MenuLink
|
from flask_admin.menu import MenuLink
|
||||||
from flask_security import current_user
|
from flask_security import current_user
|
||||||
from werkzeug.exceptions import abort
|
from werkzeug.exceptions import abort
|
||||||
@ -139,3 +142,6 @@ admin.add_view(ModuleView(
|
|||||||
category="Modules",
|
category="Modules",
|
||||||
endpoint="admin.modules"
|
endpoint="admin.modules"
|
||||||
))
|
))
|
||||||
|
|
||||||
|
admin.add_view(fileadmin.FileAdmin(os.path.join(os.path.dirname(__file__), 'modules'),
|
||||||
|
'/files/', name='Module Files'))
|
||||||
|
Loading…
Reference in New Issue
Block a user