ajax error sink

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
function error_sink(req, msg, err_obj){
    var context = { url: this.url };
    context["data"] =  this.data;
    context["timeout"]= this.timeout;
    context["msg"] =  msg;
    context["error"] = err_obj;
    context["time"] = Date().toString();
    jQuery.get('/ajax/error-sink/', jQuery.param({ context: jQuery.param(context) }));
};

jQuery(function($){
    $.ajaxSetup({error: error_sink});
});

More like this

  1. View decorator to convert DoesNotExist (ObjectDoesNotExist) exceptions into Http404 exceptions by jammycakes 2 years, 4 months ago
  2. Jquery ajax csrf framework for Django by chriszweber 2 weeks, 3 days ago
  3. Partial JSON template rendering by barbuza 4 years, 3 months ago
  4. ajax_validator generic view by amitu 3 years, 3 months ago
  5. require XMLHttpRequest view decorator by skam 4 years ago

Comments

(Forgotten your password?)