Django Auto ModelAdmin
Description
Automatically creates a ModelAdmin for each model instance passed in a list. Will also create an inline model for each related model.
Installation
pip install django-auto-modeladmin
or
pipenv install django-auto-modeladmin
Methods
- autoregister([ModelInstance/(ModelInstance, {options})]) - Allows for a tuple to be passed instead of a model instance, to allow for extra admin options like list_display, readonly_fields, etc.
Options
- list_display - A list of field names to use as the list_display.
- readonly_fields - A list of field names that should be read-only.
- exclude - A list of field names to exclude from the ModelAdmin.
- property_fields - A list of property names on the model that should be included.
Usage
from django_auto_modeladmin import autoregister
from . import models
autoregister([
(models.ModelName, {
"list_display": ["id", "name"],
"readonly_fields": ["id", "created_on", "modified_on"],
"exclude": ["uuid"],
"property_fields": ["full_name"],
})
])
Metadata
Release files for django-auto-modeladmin 0.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_auto_modeladmin-0.1.12.tar.gz | 7.2 kB | Without provenance | Details for django_auto_modeladmin-0.1.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_auto_modeladmin-0.1.12-py3-none-any.whl | Python 3 | none | any | Details for django_auto_modeladmin-0.1.12-py3-none-any.whl |
Total release size: 11.4 kB
Release files / django_auto_modeladmin-0.1.12.tar.gz
| Download URL | django_auto_modeladmin-0.1.12.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89935241866ce8d8931e1c2aee91b1c7f07b8a723ee535fa331fcc01b7fc429d
|
|
BLAKE2b-256 checksum How to use checksums |
1343c0e089661a25dfd4cea8cc1479877772048777637d06f240e2eb70e7a03f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
|
Release files / django_auto_modeladmin-0.1.12-py3-none-any.whl
| Download URL | django_auto_modeladmin-0.1.12-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b82468d26bc062c7055a24357e7ce14ce7c7ea8295b0fe21dd9d3acf8d233dcb
|
|
BLAKE2b-256 checksum How to use checksums |
e68a5d3a7424b24464cc09b0c04d7a6fb45dc54a7663e9e9e29d5f48ce990e6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
|
Security for django-auto-modeladmin 0.1.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.