Django Admin Interface - Admin Interface Module | W3school

Django offers an interactive graphical user interface (GUI) to deal with all the administrative activities. Every web project requires a ready-to-use admin interface and that’s where Django can help you. This framework automatically generates an admin interface according to your provided project models.

Also Read: Django View Creation

How to Start an Admin Interface?

This automatically generated admin interface highly depended upon the django.countrib module. To make it work efficiently, it is important that you import a few of the modules in the INSTALLED_APPS and MIDDLEWARE_CLASSES tuples. You can locate both these tuples under myproject/ file.

The module which will undergo INSTALLED_APPS will look like the following:











And for MIDDLEWARE_CLASSES, you can go ahead with the following code:









After you are done with the above mentioned step, you are required to launch the server so that you can access your admin interface. The following command will help you to initiate the database:

$ python migrate

To create all the necessary tables or collections as required by your admin interface, you need to use syncdb. This command works as per your database type. In case, if you haven’t created any superuser yet, then you will be prompted to create one. To create a superuser, run the following command on the terminal.

$ python createsuperuser

Now, you have reached to the step where to start an admin interface, you need to configure a URL as per the requirement of your admin interface. Make sure that your myproject/ file appears like the following:

from django.conf.urls import patterns, include, url

from django.contrib import admin


urlpatterns = patterns(”,

  # Examples:

  # url(r’^$’, ‘myproject.views.home’, name = ‘home’),

  # url(r’^blog/’, include(‘blog.urls’)),

  url(r’^admin/’, include(,



It’s time to run the server. For that purpose, you are required to run the given command:

$ python runserver

To access your admin interface, type in the following URL on your admin server: which will appear as the following:


After getting connected with your superuser account, the next screen will look similar to the given screenshot:


This admin interface will help you to administer all the Django groups and users. You can also administer all the registered models in your application. You can perform a minimum of four types of operations over here, which are CRUD (Create, Read, Update, Delete).