Django View Authorization: Restricting Access
Darren Jones
32:36
Description
Django provides tools for both authentication and authorization. Django view authorization is typically done with decorators. This course will show you how to use these view decorators to enforce authorized viewing of pages in your Django site.
By the end of this course you’ll know how to:
What You'll Learn?
- Use
HttpRequest
andHttpRequest.user
objects - Authenticate and authorize users
- Differentiate between regular, staff, and admin users
- Secure a view with the
@login_required
decorator - Restrict a view to different roles with the
@user_passes_test
decorator - Use the Django messages framework to notify your users
More details
User Reviews
Rating
Darren Jones
Instructor's CoursesDarren is an avid Pythonista and creates video tutorials for Real Python. Having followed a varied career as a nuclear industry instrumentation engineer, a musician, recording engineer and teacher, he’s always been interested in computers, spending the last 20 years producing music with them and teaching music technology. He’s written books on the subject, and spends the remainder of his time improving his Python skills, with a view to bringing them into the studio and classroom for better understanding of both music and programming.

Real Python
View courses Real Python- language english
- Training sessions 8
- duration 32:36
- Release Date 2023/01/05