Name Date Size

..27-Apr.-20224 KiB

.github/workflows/H28-Oct.-20214 KiB

.gitignoreH A D22-Jun.-2022312

.gitmodulesH A D13-Jul.-20200

AUTHORSH A D13-Jul.-2020802

babel/H13-Jul.-20204 KiB

doc/H30-Jan.-20224 KiB

examples/H11-Aug.-20204 KiB

flask_admin/H30-Jan.-20224 KiB

LICENSEH A D13-Jul.-20201.5 KiB

MakefileH A D13-Jul.-20205.5 KiB

MANIFEST.inH A D13-Jul.-2020235

NOTICEH A D13-Jul.-2020378

projects.rstH A D13-Jul.-2020316

README.rstH A D27-Jun.-20224.5 KiB

requirements-dev.txtH A D02-Dec.-2021337

setup.cfgH A D16-Oct.-20210

setup.pyH A D30-Jan.-20222.2 KiB

tox.iniH A D27-Jun.-2022835

README.rst

1Flask-Admin
2===========
3
4The project was recently moved into its own organization. Please update your
5references to *git@github.com:flask-admin/flask-admin.git*.
6
7.. image:: https://d322cqt584bo4o.cloudfront.net/flask-admin/localized.svg
8	:target: https://crowdin.com/project/flask-admin
9
10.. image:: https://github.com/flask-admin/flask-admin/actions/workflows/test.yaml/badge.svg
11	:target: https://github.com/flask-admin/flask-admin/actions/workflows/test.yaml
12
13
14Introduction
15------------
16
17Flask-Admin is a batteries-included, simple-to-use `Flask <http://flask.pocoo.org/>`_ extension that lets you
18add admin interfaces to Flask applications. It is inspired by the *django-admin* package, but implemented in such
19a way that the developer has total control of the look, feel and functionality of the resulting application.
20
21Out-of-the-box, Flask-Admin plays nicely with various ORM's, including
22
23- `SQLAlchemy <http://www.sqlalchemy.org/>`_,
24
25- `MongoEngine <http://mongoengine.org/>`_,
26
27- `pymongo <http://api.mongodb.org/python/current/>`_ and
28
29- `Peewee <https://github.com/coleifer/peewee>`_.
30
31It also boasts a simple file management interface and a `redis client <http://redis.io/>`_ console.
32
33The biggest feature of Flask-Admin is flexibility. It aims to provide a set of simple tools that can be used for
34building admin interfaces of any complexity. So, to start off with you can create a very simple application in no time,
35with auto-generated CRUD-views for each of your models. But then you can go further and customize those views & forms
36as the need arises.
37
38Flask-Admin is an active project, well-tested and production ready.
39
40Examples
41--------
42Several usage examples are included in the */examples* folder. Please add your own, or improve
43on the existing examples, and submit a *pull-request*.
44
45To run the examples in your local environment::
46
47  1. Clone the repository::
48
49        git clone https://github.com/flask-admin/flask-admin.git
50        cd flask-admin
51
52  2. Create and activate a virtual environment::
53
54        virtualenv env -p python3
55        source env/bin/activate
56
57  3. Install requirements::
58
59        pip install -r examples/sqla/requirements.txt
60
61  4. Run the application::
62
63        python examples/sqla/run_server.py
64
65Documentation
66-------------
67Flask-Admin is extensively documented, you can find all of the documentation at `https://flask-admin.readthedocs.io/en/latest/ <https://flask-admin.readthedocs.io/en/latest/>`_.
68
69The docs are auto-generated from the *.rst* files in the */doc* folder. So if you come across any errors, or
70if you think of anything else that should be included, then please make the changes and submit them as a *pull-request*.
71
72To build the docs in your local environment, from the project directory::
73
74    tox -e docs-html
75
76And if you want to preview any *.rst* snippets that you may want to contribute, go to `http://rst.ninjs.org/ <http://rst.ninjs.org/>`_.
77
78Installation
79------------
80To install Flask-Admin, simply::
81
82    pip install flask-admin
83
84Or alternatively, you can download the repository and install manually by doing::
85
86    git clone git@github.com:flask-admin/flask-admin.git
87    cd flask-admin
88    python setup.py install
89
90Tests
91-----
92Test are run with *pytest*. If you are not familiar with this package you can get some more info from `their website <https://pytest.org/>`_.
93
94To run the tests, from the project directory, simply::
95
96    pip install -r requirements-dev.txt
97    pytest
98
99You should see output similar to::
100
101    .............................................
102    ----------------------------------------------------------------------
103    Ran 102 tests in 13.132s
104
105    OK
106
107For all the tests to pass successfully, you'll need Postgres & MongoDB to be running locally. For Postgres::
108
109    > psql postgres
110    CREATE DATABASE flask_admin_test;
111    \q
112
113    > psql flask_admin_test
114    CREATE EXTENSION postgis;
115    CREATE EXTENSION hstore;
116
117If you're using Homebrew on MacOS, you might need this::
118
119    # install postgis
120    > brew install postgis
121
122    # set up postgresql user
123    > createuser -s postgresql
124    > brew services restart postgresql
125
126You can also run the tests on multiple environments using *tox*.
127
1283rd Party Stuff
129---------------
130
131Flask-Admin is built with the help of `Bootstrap <http://getbootstrap.com/>`_,  `Select2 <https://github.com/ivaynberg/select2>`_
132and `Bootswatch <http://bootswatch.com/>`_.
133
134If you want to localize your application, install the `Flask-BabelEx <https://pypi.python.org/pypi/Flask-BabelEx>`_ package.
135
136You can help improve Flask-Admin's translations through Crowdin: https://crowdin.com/project/flask-admin
137