sysadmin/flask-admin-integration/app/__init__.py

17 lines
319 B
Python
Raw Normal View History

2018-02-28 10:21:24 -05:00
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))