From 6ff46cdd05d6970f13ac56335a8e79865da94514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20=C5=9Awiat?= Date: Mon, 19 Jan 2015 15:35:15 +0100 Subject: [PATCH] Using the 'miemetype' parameter in HttpResponseBase was deprecated since Django 1.4. Since Django 1.7 the 'mimetype' is vanished and has been replaced with 'content_type'. Thanks to @Irexistus for pointing that out. --- pygal/ghost.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygal/ghost.py b/pygal/ghost.py index db9e4fd..b191400 100644 --- a/pygal/ghost.py +++ b/pygal/ghost.py @@ -142,11 +142,11 @@ class Ghost(object): """Render the graph, and return a Flask response""" from flask import Response return Response(self.render(**kwargs), mimetype='image/svg+xml') - + def render_django_response(self, **kwargs): """Render the graph, and return a Django response""" from django.http import HttpResponse - return HttpResponse(self.render(**kwargs), mimetype='image/svg+xml') + return HttpResponse(self.render(**kwargs), content_type='image/svg+xml') def render_to_file(self, filename, **kwargs): """Render the graph, and write it to filename"""