sysadmin/flask-admin-integration/app/__init__.py
2018-02-28 17:21:24 +02:00

17 lines
319 B
Python

from flask_admin import Admin
...
from fadmin import *
admin = Admin(
app,
name='μAdmin',
template_mode='bootstrap3',
index_view=MyAdminIndexView(
url='/fadmin'
),
)
from app.models import User, Order
admin.add_view(MyModelView(User, db.session))
admin.add_view(OrderView(Order, db.session))