From c8031363ae109f711e28caed42e692ac90dd2c7b Mon Sep 17 00:00:00 2001 From: Steve Wills Date: Sun, 14 Sep 2014 03:58:14 +0000 Subject: www/py-graphite-web: add patches to make graphite work with django 1.7 While here, pet portlint and improve pkg-message a bit Reported by: brd --- .../patch-webapp__graphite__browser__views.py | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 www/py-graphite-web/files/patch-webapp__graphite__browser__views.py (limited to 'www/py-graphite-web/files/patch-webapp__graphite__browser__views.py') diff --git a/www/py-graphite-web/files/patch-webapp__graphite__browser__views.py b/www/py-graphite-web/files/patch-webapp__graphite__browser__views.py new file mode 100644 index 000000000000..b164962536fa --- /dev/null +++ b/www/py-graphite-web/files/patch-webapp__graphite__browser__views.py @@ -0,0 +1,23 @@ +--- webapp/graphite/browser/views.py.orig 2014-09-14 03:00:52 UTC ++++ webapp/graphite/browser/views.py +@@ -77,7 +77,7 @@ + + index_file.close() + result_string = ','.join(results) +- return HttpResponse(result_string, mimetype='text/plain') ++ return HttpResponse(result_string, content_type='text/plain') + + + def myGraphLookup(request): +@@ -254,9 +254,9 @@ + #json = str(nodes) #poor man's json encoder for simple types + json_data = json.dumps(nodes) + if jsonp: +- response = HttpResponse("%s(%s)" % (jsonp, json_data),mimetype="text/javascript") ++ response = HttpResponse("%s(%s)" % (jsonp, json_data),content_type="text/javascript") + else: +- response = HttpResponse(json_data,mimetype="application/json") ++ response = HttpResponse(json_data,content_type="application/json") + response['Pragma'] = 'no-cache' + response['Cache-Control'] = 'no-cache' + return response -- cgit v1.2.3