Hi John,
You are mostly there, but you are missing necessary headers on the ajax 
request.
It isn't that much code. Just follow the couple of paragraphs of doc and 
examples here: https://docs.djangoproject.com/en/1.6/ref/contrib/csrf/#ajax

Kirby

On Wednesday, April 9, 2014 12:47:12 PM UTC-5, John Fabiani wrote:
>
>  Hi,
>
> I be honest this {% csrf_token %} has me completely baffled.  I have read 
> the doc's and I guess I have to admit I don't understand what I'm doing.
>
> I have
> <form  id="registration_form" method="post" 
> action="/register/registeruser/" >
> {% csrf_token %} ...
> Which I think is the correct way to add the token.
>
> My form uses
> submitHandler : function(form){$(form).ajaxSubmit({ beforeSubmit : 
> showRequest, success: showResponse, dataType : "json"});}
>
> The submit button does this:
> function showRequest(formData, jqForm, options){
>         var csrftoken = $.cookie('csrftoken');
>
> But I still get a 403 error.  I need some help.
>
> below is the entire code for the view.
> https://dpaste.de/JOZE
>
>
> Thanks is advance,
> Johnf
>
>  

-- 
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/2e27c3bf-c674-467d-b649-c1f426960fbd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to