The User Model and authenticate()
Verify credentials with the built-in user.
You Already Have Users
Django ships a full User model out of the box, so you never write account tables by hand. It stores usernames, hashed passwords, and more. 👤
Where the User Lives
The model sits in django.contrib.auth, an app that is enabled in fresh projects. Import it and the whole auth toolkit comes along.
from django.contrib.auth.models import UserAll lessons in this course
- The User Model and authenticate()
- login, logout, and Auth Views
- Registration with UserCreationForm
- login_required and Protecting Views