| author | cavaliet |
| Mon, 27 Aug 2012 13:00:16 +0200 | |
| changeset 755 | 8aebcfead464 |
| parent 754 | 3efbab60855a (diff) |
| parent 753 | a98bfda6d187 (current diff) |
| child 756 | a10c32ec1a7f |
| src/ldt/ldt/user/migrations/0008_auto__chg_field_groupprofile_image__chg_field_groupprofile_group__chg_.py.old | file | annotate | diff | comparison | revisions |
--- a/src/ldt/ldt/ldt_utils/views/json.py Mon Aug 27 02:21:38 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/views/json.py Mon Aug 27 13:00:16 2012 +0200 @@ -144,6 +144,11 @@ if escape_bool: json_str = escape(json_str) + # Callback to allo jsonp + callback = request.REQUEST.get("callback") + if callback is not None: + json_str = "%s(%s)" % (callback, json_str) + resp = HttpResponse(mimetype="application/json; charset=utf-8") resp['Cache-Control'] = 'no-cache, must-revalidate' resp['Pragma'] = 'no-cache'