Back to search

What is CSRF in Django?

CSRF protection ensures a state-changing request comes from your site and includes a valid token.

Django Easy Theory

What is CSRF in Django?

CSRF protection ensures a state-changing request comes from your site and includes a valid token.

  • Protects POST and unsafe methods
  • Relies on token validation
  • Use csrf_token in forms

What is CSRF in Django?