Skip to main content

A Django app to check that all models have been added to the Django admin site.

Project description

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():

import checkadmin
from myapp.models import MyModel

checkadmin.ignore(MyModel)

Now, even if MyModel is not registered with an admin site, an error will not be emitted.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-check-admin, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size django_check_admin-1.0.0-py3-none-any.whl (4.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-check-admin-1.0.0.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page