Saturday, October 22, 2011

Re: CSRF verification failed. Request aborted.

On Sat, 22 Oct 2011 19:21:59 +0100
Kayode Odeyemi <dreyemi@gmail.com> wrote:

> I am accessing my view from a Drupal application that sends in data
> via POST. I'm not using any REST API such as
> piston, django-tastypie.
>
> A few days ago, I'm smiling and happy that it all worked. Today, it's
> a different story. I'm currently getting:
>
> Forbidden (403)
>
> CSRF verification failed. Request aborted.

Of course. Drupal cannot know about the CSRF token it has to send.

You'd need to disable the CSRF-Check for that view.
You can use the csrf_exempt decorator for example, found in the
django.views.decorators.csrf module.

Regards,
ch3ka

--
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


Real Estate