I want to call a csfr protected class view inside other view in django, but this is giving me a CSFR not set error.
I tried to disable it with the csfr_exempt
function (Reference), but it did not work at all:
from django.contrib.auth import views as django_auth_views
from django.views.decorators.csrf import csrf_exempt
def my_view(request):
response = csrf_exempt(
django_auth_views.PasswordResetView.as_view()
)(request)
It keeps giving me the same error.
Is there anyway I can do it? Thanks.