Reputation: 273
As described here you can override the the default view of Flask-Admin by declaring a child class of AdminIndexView and passing the view to the admin app. Is it possible to override the the default view with a ModelView class view? If so how would I go about doing that? I only really need ModelViews for my admin panel and can't figure out how to get rid of the default view. Thanks for the help.
Upvotes: 3
Views: 3570
Reputation: 2410
You can do it if you give the endpoint 'admin' to your model view, as in:
admin = Admin(app, url='/', index_view=MyModelView(my_model, db.session, url='/', endpoint='admin'))
Upvotes: 5