Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialIskander Ismagilov
13,298 PointsCSRF token missing or incorrect ['SOLVED']
Hi, everybody! Does somebody can help with this:
When I fill the form and put "submit", instead of page stay as it should be, it shows:
Forbidden (403)
CSRF verification failed. Request aborted. Reason given for failure: CSRF token missing or incorrect.
What can be wrong?
2 Answers
alex novickis
34,894 Pointshad same problem, this was due to cached copy of the previous form being displayed, and I clicked submit
Iain Simmons
Treehouse Moderator 32,305 PointsDo you have {% csrf_token %}
in between the opening and closing form
tags in your templates/suggestion_form.html
?
Iskander Ismagilov
13,298 PointsYes I have put it. I do not know where the problem was exactly, but it got solved by it self, so now everything is ok. Thanks anyway.
Chris Freeman
Treehouse Moderator 68,441 PointsChris Freeman
Treehouse Moderator 68,441 PointsCan you post your view and template?