An example of the contrib.admin interface

One of the most powerful parts of Django is the automatic admin interface. It reads metadata in your model to provide a powerful and production-ready interface that content producers can immediately use to start adding content to the site.

Enabling the admin siteEdit

There are six steps in activating the Django admin site:

  1. Add 'django.contrib.admin' to your INSTALLED_APPS setting.
  2. Admin has two dependencies - django.contrib.auth and django.contrib.contenttypes. If these applications are not in your INSTALLED_APPS list, add them.
  3. Determine which of your application’s models should be editable in the admin interface.
  4. For each of those models, optionally create a ModelAdmin class that encapsulates the customized admin functionality and options for that particular model.
  5. Instantiate an AdminSite and tell it about each of your models and ModelAdmin classes.
  6. Hook the AdminSite instance into your URLconf.