Yea, that was it.
Also changing the url to just '/logout'

Thanks!


I'm having other problem now, the data that is getting sent to the 
javascript code from the server is json data, but the quote symbol " is 
returned as "
and so I get an error when trying to parse it.


Segunda-feira, 26 de Março de 2012 08h16min49s UTC+1, jim escreveu:
>
> Do you have CSRF protection enabled?
>
> https://docs.djangoproject.com/en/dev/ref/contrib/csrf/
>
> It will 403 POST requests unless they have the right token.
>
> Jim
>
> On Sun, Mar 25, 2012 at 11:24 PM, drk <darkiii...@gmail.com> wrote:
> > Hi, so I have a application that works offline (with localStorage),
> > and now I'm trying to get it to work in a server.
> >
> > I'm having a problem sending the data to server, I'm using jquery:
> >
> > $.ajax({
> >
> >    type: 'POST',
> >    url: 'http://mysite.aa/logout/',
> >    data: JSON.stringify( stuff ),
> >    contentType: 'text/plain; charset=utf-8',
> >    complete: function() { console.log('complete'); }
> > });
> >
> > and I get a 403 error.
> >
> > In chrome's console:
> >
> > POST http://mysite.aa/logout/ 403 (FORBIDDEN)
> > XHR finished loading: "http://myserver.aa/logout/";
> >
> > In server:
> > [25/Mar/2012 17:20:43] "POST /logout/ HTTP/1.1" 403 2282
> >
> >
> > Any ideas?
> >
> > --
> > 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 view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/7wacnIh7RvkJ.
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