November 2014
Intermediate to advanced
258 pages
5h 15m
English
In the last recipe, we saw how to get started with the Flask-Admin extension to create admin interfaces/views to our application. In this recipe, we will see how to implement admin views for our existing models with the facilities to perform CRUD operations.
We will extend our application from the last recipe to include an admin interface for the User model.
Again, with Flask-Admin, registering a model with the admin interface is very easy. We just need to add a single line of code to get this:
from flask.ext.admin.contrib.sqla import ModelView # Other admin configuration as shown in last recipe admin.add_view(ModelView(views.User, db.session))
Here, in the first line, we imported ModelView ...
Read now
Unlock full access