In the previous chapter, we learned about the User data model and used it to store user information in the database. In fact, this data model is part of a larger Django application that provides a variety of features related to user authentication and management. The Django authentication system is available in the django.contrib.auth
package. It is installed by default as part of Django, and projects created with the django-admin.py
utility have it enabled by default.
You can double-check to make sure that you have the authentication system enabled by examining the INSTALLED_APPS
variable in settings.py
. This variable contains the names of the applications available for your project. You may remember that we had to edit this variable and add the bookmarks
application that we created ourselves. The variable should look similar to the following:
INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ...