403 forbidden. CSRF token missing or incorrect. I have already tried from django.views.decorators.csrf import csrf_protect, it doesn't work. I have not used render_to_request either.
Asked
Active
Viewed 122 times
2 Answers
0
Here's an example of the csrf_token in the html of the form. That's a requirement. Do a search on csrf_token
to read about it and/or read the docs.
<form enctype="multipart/form-data" method="post" action="/finance/gl_upload/">
{% csrf_token %}
<table>
{{form.as_table}}
</table>
<input type="submit" value="Submit" id="Save" />
</form>

Deepstop
- 3,627
- 2
- 8
- 21
-
Good to know. You might want to add some more information to your question, then. If you've tried things, then you should show that. – Deepstop Jul 13 '19 at 16:22