Skip to content
Justice Tech School

CSRF Protection

Every POST form needs a token.

Example
<form method="post">
  {% csrf_token %}
  <input name="q">
  <button>Send</button>
</form>

Exercise

Token tag.

{%  %}

Quiz Test

What does CSRF protect against?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.