great, thanks man. i didnot see it. 



Am Samstag, 5. Mai 2012 09:50:37 UTC+2 schrieb Alexandr Aibulatov:
>
> Your view should return an HttpResponse Object. Your view prints 
> 'test' and returns NoneType Object. 
> Yours view should be like this: 
>
> from django.http import HttpResponse 
>
> def ajax(request): 
>       return HttpResponse('test', mimetype="text/plain") 
>
> 2012/5/5 doniyor <doniyor....@googlemail.com>: 
> > hi there, 
> > i have a small problem. i googled a lot, but couldnot find anything 
> which 
> > helps me. 
> > 
> > i have $.ajax call and before that i have included the js file where i 
> have 
> > that csrf-protection code from djangodocs. 
> > 
> > here is my ajax call: http://dpaste.com/hold/743156/ 
> > 
> > but once i click on the event, i get this error: "NetworkError: 500 
> INTERNAL 
> > SERVER ERROR - http://127.0.0.1:8000/ajax/";. 
> > my urls.py has: url(r'^ajax/', 'home.views.ajax'), 
> > 
> > and my ajax function is simply: 
> > 
> > def ajax(request): 
> >     print 'test' 
> > 
> > i dont have any clues why this is happening. can someone please help me? 
> > 
> > many many thanks 
> > 
> > 
> > 
> > 
> > -- 
> > 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/-/1Y1E6RZOc7wJ. 
> > 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/-/KN0ny68N3UYJ.
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