Sunday, June 24, 2012

Re: 403 error when POSTing to a view with csrf protection

Hi Mike,

Please provide some code examples, a traceback snippet and a bit more info.

Here are some great tips on how to do this:

Without this information, others on the list may find it much more difficult to help you.

Cal

On Sun, Jun 24, 2012 at 7:28 AM, Mike <mike.thon@gmail.com> wrote:
I realized that I was heading down the wrong track with my previous message to this mailing list so I studied the problem some more.  Now I am trying to send a POST request to a view and it gets rejected with a 403 error.  when I disable the csrf requirement using the @csrf_exempt decorator, the view works as expected.  the csrf token is being passed in the POST request, so I don't understand why else the request fails.  Any ideas?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/DDIIvexJoLMJ.
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.

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