Also I was using jquery 1.4 with Django 1.2. Should I upgrade the jquery?
Johnf
On 04/09/2014 11:54 AM, John Fabiani wrote:
I've read that paragraph 15 different ways (maybe even standing on my
head). I still don't understand what I'm missing.
Believe me I realize I might be the only person that doesn't get it -
such is life.
Could you highlight what exactly I'm missing. What do you mean by
"missing necessary headers"?
The code that includes the 'headers' in the doc's is exactly the part
I don't understand. Where does that code go and how does it relate to
my code.
Johnf
On 04/09/2014 10:51 AM, C. Kirby wrote:
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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[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/5345976E.7090406%40jfcomputer.com
<https://groups.google.com/d/msgid/django-users/5345976E.7090406%40jfcomputer.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/53459814.4050907%40jfcomputer.com.
For more options, visit https://groups.google.com/d/optout.