Django Admin Generator is a management command to automatically generate a Django `admin.py` file for given apps/models.
Project description
Introduction
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_display for all local fields
list_filter for foreign keys with few items
raw_id_fields for foreign keys with a lot of items
search_fields for name and slug fields
prepopulated_fields for slug fields
date_hierarchy for created_at, updated_at or joined_at fields
Links
Install
To install:
Run pip install django-admin-generator-blokz or execute python setup.py install in the source directory
Add django_admin_generator to your INSTALLED_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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-admin-generator-blokz-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8408acba45735288d1ab5411e2d45ca4d0ded1e464b237d89afe8eb85773d0d |
|
MD5 | 425cc91c18a8cb6e8ac5957e87de33bd |
|
BLAKE2b-256 | 30be71366db87f17e37d81f36d30a769bd04b90e2cde31a2768d85ed87350eca |
Hashes for django_admin_generator_blokz-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80c32d5275c6e08aa415f5e4d214cc5f1411168b7c2ac25c71eacd68158fce0b |
|
MD5 | 9d38f3d821ab549f134713158dfdb8b2 |
|
BLAKE2b-256 | 07391bcbc8c770a6b63a8ba649554950e632131b5f48613574ec5c31f6ba9d76 |