django-check-admin is a Django app that adds a system check to verify that all models have been registered with the Django admin site. This check is useful if all models of a project should normally be registered.
Installation
Install the package with pip:
$ pip install django-check-admin
Add 'checkadmin' to INSTALLED_APPS.
INSTALLED_APPS = [
...
'checkadmin',
]
Running
Use the Django management command check:
$ python manage.py check
If a model is not registered with the Django admin site, an error will be emitted. For example:
The model myapp.MyModel is not registered with an admin site.
If specific models should be ignored by the check, use checkadmin.ignore() or define a list of ignored models in your settings with CHECK_ADMIN_IGNORED_MODELS:
import checkadmin
from myapp.models import MyModel
checkadmin.ignore(MyModel)
CHECK_ADMIN_IGNORED_MODELS = ["myapp.MyModel"]
Now, even if MyModel is not registered with an admin site, an error will not be emitted.
Metadata
Release files for django-check-admin 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-check-admin-1.2.0.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_check_admin-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.3 kB
Release files / django-check-admin-1.2.0.tar.gz
| Download URL | django-check-admin-1.2.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f71d74f215dc89497b255218faa68b64aa31647e28f780619258459a1b28f27
|
|
BLAKE2b-256 checksum How to use checksums |
aade97c7e955debcdbc016480792994986be59e432226bd5342cbd333817274f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.7
|
Release files / django_check_admin-1.2.0-py3-none-any.whl
| Download URL | django_check_admin-1.2.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2770211387568a8e64028395b1f2b79910fabb7127e39cdb92deca6b1ae53741
|
|
BLAKE2b-256 checksum How to use checksums |
cfda1cc5113ef2b3d89a3f7534e6dc1353cc2ab20461844a3bae0bc11d56b10c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.7
|