Module 08 of 12

Authentication & Permissions

Lessons

About This Module

As soon as an application has users, it needs to answer two questions: who is this person (authentication) and what are they allowed to do (authorization). Django ships with a complete auth system that handles user accounts, password hashing, sessions, and permissions, so you do not have to build any of it from scratch.

In this module you will learn how to let people register, log in, and log out using the built-in User model and auth views. You will then learn how to protect pages with login_required and LoginRequiredMixin, and how permissions control who can view or change specific content.

Watch the lessons in order, then continue on to REST APIs with Django REST Framework. Some of these videos were recorded on older Django releases, so check the official documentation if a detail differs on your install.

Lessons

4 videos
01

Python Django Tutorial: Full-Featured Web App Part 6 - User Registration

Corey Schafer builds a user registration page, using Django forms to create new accounts.

02

Python Django Tutorial: Full-Featured Web App Part 7 - Login and Logout System

Corey Schafer adds login and logout using the built-in authentication views.

03

Django Tutorial - Login, Logout and User Authentication

Covers creating login and logout pages and authenticating users with the built-in auth system.

04

Python Django Tutorial #12: Django Permissions, Django Login Required Mixin

Shows how to restrict access to pages using Django permissions and the login required mixin.