Thursday, June 28, 2012

Re: 'CSRF verification failed." from django.contrib.comments. can you help solve it? django 1.3

On do, jun 28, 2012 at 09:14:36 -0700, brycenesbitt wrote:
> <form action="/comments/post/ <view-source:http://127.0.0.1:8000/comments/post/>" method="post">
> <div><input type="hidden" name="object_pk" value="28" id="id_object_pk" /></div>
> <div><input type="hidden" name="timestamp" value="1340899354" id="id_timestamp" /></div>
> <div><input type="hidden" name="security_hash" value="6e85e1c846861c80575ce435b21a855706725b00" id="id_security_hash" /></div>

After the starting form tag add {% csrf_token %}

More information about it: https://docs.djangoproject.com/en/dev/ref/contrib/csrf/

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment