Book Image

Learning Website Development with Django

Book Image

Learning Website Development with Django

Overview of this book

Table of Contents (18 chapters)
Learning Website Development with Django
Credits
About the Author
About the Reviewers
Preface
Index

Session Authentication


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',
    ...