django-forms-7

Last Updated :
Discuss
Comments

When sending an Ajax POST request to Django which element must be included to avoid a 403 Forbidden error?

form ajax="true"

method="get"

enctype="multipart/form-data"

<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">

Tags:
Share your thoughts in the comments