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. Use MEDIA_URL in 500 error page by bthomas 3 years, 6 months ago
  2. Upload progress handler using cache framework by ebartels 4 years, 1 month ago
  3. upload handler decorators by Rozza 3 years, 10 months ago
  4. Generic AJAX app by Rupe 2 years, 11 months ago
  5. require XMLHttpRequest view decorator by skam 4 years, 3 months ago

Comments

buriy (on January 31, 2008):

how about to email error that was happened? ;)

#

(Forgotten your password?)