X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/dbb1ae2cf25105f7a3831961b08386a1326baef8..bf3f18ce9313f4929ff327fbf12803157de171cb:/apps/ajaxable/utils.py?ds=inline diff --git a/apps/ajaxable/utils.py b/apps/ajaxable/utils.py index 4a801206b..89b56228d 100755 --- a/apps/ajaxable/utils.py +++ b/apps/ajaxable/utils.py @@ -23,16 +23,6 @@ class LazyEncoder(json.JSONEncoder): return force_unicode(obj) return obj -# shortcut for JSON reponses -class JSONResponse(HttpResponse): - def __init__(self, data={}, callback=None, **kwargs): - # get rid of mimetype - kwargs.pop('mimetype', None) - data = json.dumps(data) - if callback: - data = callback + "(" + data + ");" - super(JSONResponse, self).__init__(data, mimetype="application/json", **kwargs) - def method_decorator(function_decorator): """Converts a function decorator to a method decorator.