A custom 500 handler which is AJAX-aware

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

  1. require XMLHttpRequest view decorator by skam 5 years, 3 months ago
  2. Simple Exception Response for AJAX debugging by newmaniese 5 years, 2 months ago
  3. Ajax required decorator by zenx 4 years, 12 months ago
  4. Use MEDIA_URL in 500 error page by bthomas 4 years, 6 months ago
  5. Upload progress handler using cache framework by ebartels 5 years, 1 month ago

Comments

buriy (on January 31, 2008):

how about to email error that was happened? ;)

#

(Forgotten your password?)