Re: CSRF token not adding hidden form field
The error I am getting is: "CSRF token missing or incorrect" I went
and looked in the source for the place where it gives that error and
it was this point:
request_csrf_token = request.POST.get('csrfmiddlewaretoken', None)
if request_csrf_token != csrf_token:
if cookie_is_new:
# probably a problem setting the CSRF cookie
return reject("CSRF cookie not set.")
else:
return reject("CSRF token missing or incorrect")
This is is the Cross Site Request Forgery Middleware. I am using the
template tag. I am following the directions. Middleware is there. What
could this be?
On Jun 9, 3:58 pm, joelklabo <joelkl...@gmail.com> wrote:
> I have added the {% csrf_token %} to my template. and I have the
> django.middleware.csrf.CsrfViewMiddleware installed. I am on Django
> 1.2.1 but I keep getting 403 errors. And, when I view the source of my
> page there is no hidden form field. No sign of the token.
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home