summaryrefslogtreecommitdiff
path: root/packages/views/display.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-01-13 22:34:33 -0600
committerDan McGee <dan@archlinux.org>2013-01-13 22:34:33 -0600
commit66850026ca934e5a09238e9033c541cdc5085a42 (patch)
treef92873cdc34c2ebf446173513da54b96f9bb156f /packages/views/display.py
parent019785186ce5861215ece96818513ec21e15df41 (diff)
Use content_type and not mimetype on HttpResponse()
Bug #16519 in Django deprecates mimetype, so update our code accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/views/display.py')
-rw-r--r--packages/views/display.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/views/display.py b/packages/views/display.py
index efedf6ff..445c1abe 100644
--- a/packages/views/display.py
+++ b/packages/views/display.py
@@ -188,7 +188,7 @@ def details_json(request, name, repo, arch):
pkg = get_object_or_404(Package,
pkgname=name, repo__name__iexact=repo, arch__name=arch)
to_json = json.dumps(pkg, ensure_ascii=False, cls=PackageJSONEncoder)
- return HttpResponse(to_json, mimetype='application/json')
+ return HttpResponse(to_json, content_type='application/json')
def files_json(request, name, repo, arch):
@@ -209,7 +209,7 @@ def files_json(request, name, repo, arch):
'files': fileslist,
}
to_json = json.dumps(data, ensure_ascii=False, cls=PackageJSONEncoder)
- return HttpResponse(to_json, mimetype='application/json')
+ return HttpResponse(to_json, content_type='application/json')
def download(request, name, repo, arch):