1👍
In register.html you need to add csrf token within <form> </form>
like this: {% csrf_token %}
, hopefully it will resolve the problem.
0👍
This might not be the best practice but you can add:
@csrf_exempt
Just above the functions in the view.py file.
See example in django-rest-framework tutorial:
Writing regular Django views
- [Answer]-Apphooks in django cms 3
- [Answer]-How to Fake django.contrib.auth User value for specific user?
- [Answer]-Having trouble installing Django 1.8 in virtualenv
- [Answer]-Django postres methods for external Database
Source:stackexchange.com