Accessing the Django admin interface
To access our database, we have to go into the Django admin interface. Remember that there is an admin
path in /moviesstore/urls.py
… urlpatterns = [ path('admin/', admin.site.urls), path('', include('home.urls')), path('movies/', include('movies.urls')), ]
If you go to localhost:8000/admin
, you’ll be taken to the admin site, as shown in Figure 5.5:
Figure 5.5 – Admin page
Django has a powerful built-in admin interface that provides a visual way of managing all aspects of a Django project – for example, users, movies, and more.
With what username and password do we log in to the admin interface? For this, we have to create a superuser in the Terminal.
Creating a superuser
Let’s create a superuser to access the admin panel. In the Terminal, stop the...