Re: request.is_ajax() not working

2012-04-23 Thread Masklinn
On 2012-04-23, at 14:44 , psychok7 wrote: > i am using Chrome. > > to be honest i dont really understand everything you are talking about, so > ill just try to run your code and see if i can get results > on the other hand if i use GET instead of POST i dont have to worry about > CSRF >

Re: request.is_ajax() not working

2012-04-23 Thread psychok7
i am using Chrome. to be honest i dont really understand everything you are talking about, so ill just try to run your code and see if i can get results on the other hand if i use GET instead of POST i dont have to worry about CSRF right? i am not sure you understood my question though, i am

Re: request.is_ajax() not working

2012-04-23 Thread psychok7
x post, like this > $.post("api/newdoc/", {'user':'your username'}, function(data) { > alert(data); > }); > } > > 在 2012年4月23日星期一,psychok7 写道: > >> hi there i am trying a simple example using AJAX, DJANGO, JQUERY, JSON >> and my if request.is_ajax

Re: request.is_ajax() not working

2012-04-22 Thread Amao Zhao
le using AJAX, DJANGO, JQUERY, JSON and > my if request.is_ajax() is not working for some reason.. here is my code: > > URLS: (r'api/newdoc/$', 'rose_miracle.views.newdoc'), > > VIEW: > def newdoc(request): > # only process POST request > print "entrei" >

request.is_ajax() not working

2012-04-22 Thread psychok7
hi there i am trying a simple example using AJAX, DJANGO, JQUERY, JSON and my if request.is_ajax() is not working for some reason.. here is my code: URLS: (r'api/newdoc/$', 'rose_miracle.views.newdoc'), VIEW: def newdoc(request): # only process POST request print "e