7👍
The CSRF protection ignores GET requests (see how it works). Therefore you can simply remove {% csrf_token%}
from the form in your template.
<form method="get" action=".">
{% csrf_token %}<!-- remove this line -->
{{ form }}
</form>
4👍
Remove {% csrf_token %}
from your form in the template, you don’t need it since you’re making a GET request.
- [Django]-How to include "None" in lte/gte comparisons?
- [Django]-'AssertionError' object has no attribute 'message'
Source:stackexchange.com