Using the Flask-Admin extension
Flask-Admin is an available extension that helps in the creation of admin interfaces for our application in a simpler and faster way. All the subsequent recipes in this chapter will focus on using and extending this extension.
Getting ready
First, we need to install the Flask-Admin extension:
$ pip install Flask-Admin
We will extend our application from the first recipe and keep building over the same.
How to do it…
Adding a simple admin interface to any Flask application using the Flask-Admin extension is just a matter of a couple of statements.
We just need to add the following lines to our application's configuration:
from flask.ext.admin import Admin app = Flask(__name__) # Add any other application configuration admin = Admin(app)
Just initializing an application with the Admin
class from the Flask-Admin extension will put up a basic admin page, as shown in the following screenshot:
Notice the URL in the screenshot,...