Skip to main content

Simple and extensible admin interface framework for Flask

Project description

Flask-Admin

Introduction

This is library for building adminstrative interface on top of Flask framework.

Instead of providing simple scaffolding for the SQLAlchemy models, Flask-Admin provides tools that can be used to build adminstrative interface of any complexity, using consistent look and feel.

Small example (Flask initialization omitted):

app = Flask(__name__)

admin = Admin()
admin.add_view(ModelView(User, db.session))
admin.add_view(GalleryManager(name='Photos', category='Cats'))
admin.init_app(app)

If you’re looking for 0.x version of the Flask-Admin written by Andy Wilson, check here.

Documentation

Flask-Admin is extensively documented, you can find documentation here.

3rd Party Stuff

Flask-Admin is built with help of Twitter Bootstrap and Select2.

Kudos

Some ideas were taken from the Flask-Admin by Andy Wilson.

Examples

Library comes with few examples, you can find them in examples directory.

Changelog

1.0.3

General:

  • Peewee 2.x support
  • Model form scaffolding is now customizable in model views
  • Inline model forms are much more customizable now
  • List view type-based formatters
  • Database NULL will be displayed in list view as empty string by default. Use type-based formatter if you want to show something else.
  • Use Select2 instead of Chosen
  • List view formatting callbacks. See example.
  • _template_args property is now available in all views
  • on_model_change and on_model_delete callbacks
  • Model backends now support list_display_pk property
  • Minor template refactoring, more blocks to override
  • Supported multiple Admin class instances for one Flask application
  • File uploads are now supported in model views
  • Use HTTPS CDN for jQuery
  • Lots of minor fixes

SQLAlchemy backend:

  • Support for non-nullable boolean fields
  • If create/delete/update fails, Flask-Admin will rollback the transaction
  • Default column values support
  • list_display_all_relations to show many-to-one relations in list view
  • get_query method, which can be overridden to implement additional filtering/sorting/etc
  • Synonym properties support
  • Backend will ignore protected fields (name starting with underscore) from now on
  • Support for various PostgreSQL fields

1.0.2

  • Peewee model backend
  • Inline form administration interface for models a-la Django
  • Mass actions - methods that work with more than one item (for example - mass delete for models or files)
  • SQLAlchemy form scaffolding is now independent from the wtforms.ext.sqlalchemy helpers
  • Added ability to mount administrative interface as a top-level folder
  • Administrative interface can now be mounted as a subdomain
  • Can now use FileField in model admin
  • Revamped model templates, much more customizable now
  • Model list view column formatting callbacks
  • Lots of bugfixes

1.0.1

  • Fixed setup manifest

1.0.0

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Flask-Admin, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size Flask-Admin-1.0.3.tar.gz (154.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page