Django Admin Interface

Django provides a built-in admin module which can be used to perform CRUD operations on the models. It reads metadata from the model to provide a quick interface where the user can manage the content of the application.

This is a built-in module and designed to perform admin related tasks to the user.

Let's see how to activate and use Django's admin module (interface).

The admin app (django.contrib.admin) is enabled by default and already added into INSTALLED_APPS section of the settings file.

To access it at browser use '/admin/' at a local machine like localhost:8000/admin/ and it shows the following output:

Django Admin Interface

It prompts for login credentials if no password is created yet, use the following command to create a user.

Create an Admin User

snippet
$ python3 managen.py createsuperuser
django admin interface 1

Now start development server and access admin login.

snippet
$ python3 manage.py runserver

Provide created username and password and login.

django admin interface 2

After login successfully, it shows the following interface.

django admin interface 3

It is a Django Admin Dashboard. Here, we can add and update the registered models. The model registration process will be discussed in further chapters.

Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +