Paul's Programming Notes PostsRSSGithub

Override ModelView Class - Flask-Admin

The Flask-Admin docs show how to override your base ModelView (wrap shared logic in a base class all your views inherit): flask-admin.readthedocs.io/en/latest/introduction

You would want to do this if you wanted to add something to all of your admin classes. Use cases:

  • If you wanted to require login by overriding is_accessible for all of your ModelViews.
  • If you wanted to add an export method to all of your ModelViews.