To prevent the CSRF validation you can use the csrf_exempt decorator

https://docs.djangoproject.com/en/1.7/ref/contrib/csrf/#utilities

The normal way to handle a POST request is to issue a redirect (HTTP 302)
after handling the request, but if it is an automated request I guess you
can return an empty response directly from the view.

On Mon, Mar 30, 2015 at 3:20 PM, Tanmay Kansara <[email protected]>
wrote:

> I am trying to do the following:
>
> 1) A payment solution is supposed to send an HTTP Post to my site
> 2) I would like to read the contents of the request(xml) and update my
> records to reflect the payment
>
> I am trying this for the first time. When I create a URL path, and send a
> post to that address I get the csrf error.
>
> Is there a way using Django wherein I can accept a post and don't have to
> return a response.
>
> Thanks Tanmay
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/e722bcd3-51e1-4fbb-a38d-6fd898317e52%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e722bcd3-51e1-4fbb-a38d-6fd898317e52%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CALn3ei0Hjf0UVXdTVVz3W2ZrvaGDxCcpncTg4onB30cnPVi%3D0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to