CSRF Protection and the POST Flow
Handle the GET/POST submit cycle securely.
What CSRF Is
CSRF tricks a logged-in user into submitting a hidden request. Django blocks it so attackers cannot act on a user's behalf. 🔒
Protection Is On
Django enables CsrfViewMiddleware by default, so every unprotected POST is rejected until you add the right token.
All lessons in this course
- Defining a forms.Form
- is_valid and cleaned_data
- Rendering Forms in Templates
- CSRF Protection and the POST Flow