What you want to compare is the expected token value and the token value the view received (via POST, PUT, DELETE, etc.). These values need to match. Printing out the token via {{ csrf_token }} in the template will show you the token that the view will receive when the form is submitted. This submitted value needs to match the value in the cookie named csrftoken.
On Friday, January 30, 2015 at 1:59:45 PM UTC-8, Pouria M wrote:
Thanks Zach.What are your thoughts after this test? if they match or if they don't match
On Wednesday, January 28, 2015 at 9:46:23 PM UTC-8, Zach Borboa wrote:For anyone trying to debug this issue, you may want to print out the variable using {{ csrf_token }} as well as using {% csrf_token %} on the form to verify the token is correct.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e7d8ec73-4fc1-44bf-9424-77edb20d4bb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment