Book Image

Learning Flask Framework

Book Image

Learning Flask Framework

Overview of this book

Table of Contents (17 chapters)
Learning Flask Framework
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Installing Flask-Admin


Flask-Admin provides a readymade admin interface for Flask applications. Flask-Admin also integrates nicely with SQLAlchemy to provide views for managing your application's models.

The following image gives is a sneak preview of what the Entry admin will look like by the end of this chapter:

While this amount of functionality requires relatively little code, we still have a lot to cover, so let's get started. Begin by installing Flask-Admin into virtualenv using pip. At the time of writing, the current version of Flask-Admin is 1.0.7.

(blog) $ pip install Flask-Admin
Downloading/unpacking Flask-Admin
...
Successfully installed Flask-Admin
Cleaning up...

You can test that it installed correctly if you wish by entering the following code:

(blog) $ python manage.py shell
In [1]: from flask.ext import admin
In [2]: print admin.__version__
1.0.7

Adding Flask-Admin to our app

Unlike the other extensions in our app, which we instantiated in the app module, we will be setting...