How to resolve CSRF token missing or incorrect in Django form submission

preview_player
Показать описание
How to resolve CSRF token missing or incorrect in Django form submission
Рекомендации по теме
Комментарии
Автор

I have already written render...but error is still there...what to do now?

akankshajha
Автор

I'm using Django 1.9 and it worked only when I gave 'request' itself instead of RequestContext(request) as the first argument for 'render' function.

return render(request, 'contact_form.html', {'errors':errors})

Nevertheless, your video helped me so much, thanks a lot for it!

konstantinv.
Автор

Am on 2.2 and using render, had no issue till today until I reset the DB and did migration again, How to fix the error?

salomonthomas
Автор

thanks i was already using render but instead of request i was using response that was the error

akashchaturvedi
Автор

how to resolve the problem in admin login? thanks!

franklinokiya
Автор

i dont have django i am just using google chrome

jimicrack