django-admin-generator
django-admin-generator copied to clipboard
The Django Admin Generator automatically generates (scaffolds) a fully functioning Django admin by introspecting and querying your models
Readme
Introduction
Build status:
.. image:: https://github.com/WoLpH/django-admin-generator/actions/workflows/main.yml/badge.svg :alt: django-admin-generator test status :target: https://github.com/WoLpH/django-admin-generator/actions
Coverage:
.. image:: https://coveralls.io/repos/WoLpH/django-admin-generator/badge.svg?branch=master :alt: Coverage Status :target: https://coveralls.io/r/WoLpH/django-admin-generator?branch=master
The Django Admin Generator is a project which can automatically generate (scaffold) a Django Admin for you. By doing this it will introspect your models and automatically generate an Admin with properties like:
list_displayfor all local fieldslist_filterfor foreign keys with few itemsraw_id_fieldsfor foreign keys with a lot of itemssearch_fieldsfor name andslugfieldsprepopulated_fieldsforslugfieldsdate_hierarchyforcreated_at,updated_atorjoined_atfields
Links
- Documentation
- http://django-admin-generator.readthedocs.org/en/latest/
- Source
- https://github.com/WoLpH/django-admin-generator
- Bug reports
- https://github.com/WoLpH/django-admin-generator/issues
- Package homepage
- https://pypi.python.org/pypi/django-admin-generator
- My blog
- http://w.wol.ph/
Install
To install:
- Run
pip install django-admin-generatoror executepython setup.py installin the source directory - Add
django_admin_generatorto yourINSTALLED_APPS
If you want to run the tests, run py.test (requires pytest)
Usage
To generate an admin for a given app:
./manage.py admin_generator APP_NAME >> APP_NAME/admin.py
To generate an admin for a given app with all models starting with user:
./manage.py admin_generator APP_NAME '^user' >> APP_NAME/admin.py