Can't use {% csrf_token %} tag inside your <form>'s?
See csrf_exempt decorator:
http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#exceptions
Regards,
Rolando Espinoza La fuente
www.insophia.com
I had problems too, but the decorator is a good patch for the moment :-)
Thanks!
--
Karim Gojux
www.karimblog.net
--
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/-/BQ5RpafQK3EJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
If you are access to the form (meaning you are in the dom), and if you don't mind using jQuery, there is the even simpler:<script type="text/javascript">
$.post("/some/url", $("#someform").serialize(), function(data){
// Do whatever with data
})$("#someform").serialize() automatically adds the crsf_token which should be contained in your form. This makes a lot easier to validate your form via AJAX.
Cheers,Nicolas Patry
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/zaZHJCPKDuAJ.