Hey Mike,

Make sure that you include this within your <form> block: {% csrf_token %}

Then, check the source code of that page to make sure the <input
type="hidden" .../> CSRF token tag was included.

Finally, using a Javascript debugger (such as Firebug) check to make sure
that your request sent, when clicking the "submit" button, included the
csrf token.

Also, make sure your cache and sessions are setup correctly as that is what
Django relies upon for using this protection.

On Sun, Jun 24, 2012 at 9:15 AM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:

> 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:
> https://code.djangoproject.com/wiki/UsingTheMailingList
>
> 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.t...@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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to