Simple and extensible admin interface framework for Flask
Flask-Admin is a batteries-included, simple-to-use Flask extension that lets you add admin interfaces to Flask applications. It is inspired by the django-admin package, but implemented in such a way that the developer has total control of the look, feel and functionality of the resulting application.
Out-of-the-box, Flask-Admin plays nicely with various ORM’s, including
It also boasts a simple file management interface and a redis client console.
The biggest feature of Flask-Admin is flexibility. It aims to provide a set of simple tools that can be used for building admin interfaces of any complexity. So, to start off with you can create a very simple application in no time, with auto-generated CRUD-views for each of your models. But then you can go further and customize those views & forms as the need arises.
Flask-Admin is an active project, well-tested and production ready.
Several usage examples are included in the /examples folder. Please feel free to add your own examples, or improve on some of the existing ones, and then submit them via GitHub as a pull-request.
You can see some of these examples in action at http://examples.flask-admin.org. To run that same page in your local environment, simply:
cd flask-admin python examples/runserver.py
Alternatively, you can run the examples one at a time, with something like:
cd flask-admin python examples/simple/simple.py
Flask-Admin is extensively documented, you can find all of the documentation at http://readthedocs.org/docs/flask-admin.
The docs are auto-generated from the .rst files in the /doc folder. So if you come across any errors, or if you think of anything else that should be included, then please make the changes and submit them as a pull-request.
To build the docs in your local environment:
sudo pip install sphinx cd flask-admin sudo make html
Or, if you want to preview any .rst snippets that you may want to contribute, go to http://rst.ninjs.org/.
To install Flask-Admin, simply:
pip install flask-admin
Or alternatively, you can download the repository and install manually by doing:
git clone firstname.lastname@example.org:mrjoes/flask-admin.git cd flask-admin python setup.py install
Test are run with nose. If you are not familiar with this package you can get some more info from their website.
To run the tests, simply:
pip install nose
cd flask-admin nosetests
You should see output similar to:
... ---------------------------------------------------------------------- Ran 41 tests in 2.092s
Please note that you will need to install some additional dependencies in order for all of the tests to be executed successfully.
- Cleaned up documentation, many thanks to Petrus Janse van Rensburg.
- More flexible menu system, ability to add links to menus
- Human-readable filter URLs
- Callable filter
- Simple accessibility fixes
- Support for newer wtforms versions
form_rulesproperty that affects both create and edit forms
- Lots of bugfixes
Full change log and feature walkthrough can be found here.
- Python 3 support
- AJAX-based foreign-key data loading for all backends
- New, optional, rule-based form rendering engine
- MongoEngine fixes and features: GridFS support, nested subdocument configuration and much more
- Greatly improved and more configurable inline models
- New WTForms fields and widgets
form_extra_columnsallows adding custom columns to the form declaratively
- Redis cli
- SQLAlchemy backend can handle inherited models with multiple PKs
- Lots of bug fixes
- Model views now support default sorting order
- Model type/column formatters now accept additional
is_visiblefor administrative views
- Model views have
after_model_changemethod that can be overridden
- In model views,
get_querywas split into
- Bootstrap 2.3.1
- Bulk deletes go through
- Flask-Admin no longer uses floating navigation bar
- Translations: French, Persian (Farsi), Chinese (Simplified/Traditional), Czech
- Bug fixes