Skip to main content

Django Admin Generator is a management command to automatically generate a Django `admin.py` file for given apps/models.

Project description

Introduction

Test Status Coverage Status

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

Install

To install:

  1. Run pip install django-admin-generator or execute python setup.py install in the source directory

  2. 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

django-admin-generator-2.2.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

django_admin_generator-2.2.1-py2.py3-none-any.whl (11.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-admin-generator-2.2.1.tar.gz.

File metadata

  • Download URL: django-admin-generator-2.2.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0b5

File hashes

Hashes for django-admin-generator-2.2.1.tar.gz
Algorithm Hash digest
SHA256 de7726617d64aeb209076715de12c5a0e40f1027be37e8f602d9cae050946c3d
MD5 14d3e07044e6b0f36b6069d4a1408626
BLAKE2b-256 59b29ee11917408cba41efb69ac283678c5b1f5515fc0b904e1bb67e82522741

See more details on using hashes here.

File details

Details for the file django_admin_generator-2.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: django_admin_generator-2.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0b5

File hashes

Hashes for django_admin_generator-2.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7ff395e0ea497e1af9d4e030c500334ded59356a82325a9e2917f8b1bbad0532
MD5 0dbf6890bb41a38abc3fe0550df17c66
BLAKE2b-256 9a469ec529b46518e37aeed27c474f36eb135dfdb471040dddac2e432713d531

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page