Commit b47f3815 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

cyclades: Enable jsonp response in admin stats api

parent c68209a2
......@@ -45,10 +45,11 @@ log = logging.getLogger(__name__)
@api.api_method(http_method='GET', user_required=False, token_required=False,
logger=log)
@api.allow_jsonp()
def get_stats(request):
stats = get_statistics()
data = json.dumps(stats)
return http.HttpResponse(data, status=200)
return http.HttpResponse(data, status=200, content_type='application/json')
def get_statistics():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment