[Answer]-Cross Site Request Forgery Issue in Django

1👍

In register.html you need to add csrf token within <form> </form> like this: {% csrf_token %}, hopefully it will resolve the problem.

👤ruddra

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

Leave a comment