DESCRIPTION.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. Flask-Admin
  2. ===========
  3. The project was recently moved into its own organization. Please update your
  4. references to *git@github.com:flask-admin/flask-admin.git*.
  5. .. image:: https://d322cqt584bo4o.cloudfront.net/flask-admin/localized.svg
  6. :target: https://crowdin.com/project/flask-admin
  7. .. image:: https://travis-ci.org/flask-admin/flask-admin.svg?branch=master
  8. :target: https://travis-ci.org/flask-admin/flask-admin
  9. Introduction
  10. ------------
  11. Flask-Admin is a batteries-included, simple-to-use `Flask <http://flask.pocoo.org/>`_ extension that lets you
  12. add admin interfaces to Flask applications. It is inspired by the *django-admin* package, but implemented in such
  13. a way that the developer has total control of the look, feel and functionality of the resulting application.
  14. Out-of-the-box, Flask-Admin plays nicely with various ORM's, including
  15. - `SQLAlchemy <http://www.sqlalchemy.org/>`_,
  16. - `MongoEngine <http://mongoengine.org/>`_,
  17. - `pymongo <http://api.mongodb.org/python/current/>`_ and
  18. - `Peewee <https://github.com/coleifer/peewee>`_.
  19. It also boasts a simple file management interface and a `redis client <http://redis.io/>`_ console.
  20. The biggest feature of Flask-Admin is flexibility. It aims to provide a set of simple tools that can be used for
  21. building admin interfaces of any complexity. So, to start off with you can create a very simple application in no time,
  22. with auto-generated CRUD-views for each of your models. But then you can go further and customize those views & forms
  23. as the need arises.
  24. Flask-Admin is an active project, well-tested and production ready.
  25. Examples
  26. --------
  27. Several usage examples are included in the */examples* folder. Please feel free to add your own examples, or improve
  28. on some of the existing ones, and then submit them via GitHub as a *pull-request*.
  29. You can see some of these examples in action at `http://examples.flask-admin.org <http://examples.flask-admin.org/>`_.
  30. To run the examples on your local environment, one at a time, do something like::
  31. cd flask-admin
  32. python examples/simple/app.py
  33. Documentation
  34. -------------
  35. Flask-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/>`_.
  36. The docs are auto-generated from the *.rst* files in the */doc* folder. So if you come across any errors, or
  37. if you think of anything else that should be included, then please make the changes and submit them as a *pull-request*.
  38. To build the docs in your local environment, from the project directory::
  39. pip install -r requirements-dev.txt
  40. sudo make html
  41. And if you want to preview any *.rst* snippets that you may want to contribute, go to `http://rst.ninjs.org/ <http://rst.ninjs.org/>`_.
  42. Installation
  43. ------------
  44. To install Flask-Admin, simply::
  45. pip install flask-admin
  46. Or alternatively, you can download the repository and install manually by doing::
  47. git clone git@github.com:flask-admin/flask-admin.git
  48. cd flask-admin
  49. python setup.py install
  50. Tests
  51. -----
  52. Test are run with *nose*. If you are not familiar with this package you can get some more info from `their website <https://nose.readthedocs.io/>`_.
  53. To run the tests, from the project directory, simply::
  54. pip install -r requirements-dev.txt
  55. nosetests
  56. You should see output similar to::
  57. .............................................
  58. ----------------------------------------------------------------------
  59. Ran 102 tests in 13.132s
  60. OK
  61. For all the tests to pass successfully, you'll need Postgres & MongoDB to be running locally. For Postgres::
  62. CREATE DATABASE flask_admin_test;
  63. CREATE EXTENSION postgis;
  64. You can also run the tests on multiple environments using *tox*.
  65. 3rd Party Stuff
  66. ---------------
  67. Flask-Admin is built with the help of `Bootstrap <http://getbootstrap.com/>`_ and `Select2 <https://github.com/ivaynberg/select2>`_.
  68. If you want to localize your application, install the `Flask-BabelEx <https://pypi.python.org/pypi/Flask-BabelEx>`_ package.
  69. You can help improve Flask-Admin's translations through Crowdin: https://crowdin.com/project/flask-admin