1 2 3 4 5 | def my_500(request):
if request.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest':
return HttpResponse("")
else:
return render_to_response("500.html",{},context_instance=RequestContext(request))
|
More like this
- Use MEDIA_URL in 500 error page by bthomas 3 years, 6 months ago
- Upload progress handler using cache framework by ebartels 4 years, 1 month ago
- upload handler decorators by Rozza 3 years, 10 months ago
- Generic AJAX app by Rupe 2 years, 11 months ago
- require XMLHttpRequest view decorator by skam 4 years, 3 months ago
Comments
how about to email error that was happened? ;)
#