Guided Notes
Authentication
Login, logout, and permissions.
Django's auth system
Slide 1 / 5django.contrib.auth provides: • a User model (username, email, password, is_staff, is_superuser), • secure password hashing — passwords are never stored in plain text, • login and logout views, • permissions and groups, • request.user in every view and template.
For new projects, consider a custom user model from the start (AUTH_USER_MODEL) so you can add fields later without painful migrations.