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
- Documentation
- Package homepage
- My blog
Install
To install:
Run pip install django-admin-generator 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
Release history Release notifications | RSS feed
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-2.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | de7726617d64aeb209076715de12c5a0e40f1027be37e8f602d9cae050946c3d |
|
MD5 | 14d3e07044e6b0f36b6069d4a1408626 |
|
BLAKE2b-256 | 59b29ee11917408cba41efb69ac283678c5b1f5515fc0b904e1bb67e82522741 |
Hashes for django_admin_generator-2.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ff395e0ea497e1af9d4e030c500334ded59356a82325a9e2917f8b1bbad0532 |
|
MD5 | 0dbf6890bb41a38abc3fe0550df17c66 |
|
BLAKE2b-256 | 9a469ec529b46518e37aeed27c474f36eb135dfdb471040dddac2e432713d531 |