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 /moviereviews/urls.py
?
… urlpatterns = [ path('admin/', admin.site.urls), path('', movieViews.home), path('about/', movieViews.about), path('signup/', movieViews.signup, name='signup'), ]
If you go to localhost:8000/admin
, it brings you to the admin site (as shown in Figure 5.5):
Django has a powerful built-in admin interface that provides a visual way of managing all aspects of a Django project – for example, managing users and making changes to model data.
With what username and password do we log in to Admin? We will have to first create a superuser in the Terminal.
In the Terminal, run the following.
For...