From 10937eb6d8889b1c41a5641320b4965f160d20e0 Mon Sep 17 00:00:00 2001 From: Andreas Hug Date: Sat, 23 Nov 2013 12:18:09 +0100 Subject: [PATCH] Replace deprecated mimetype with content_type Passing `mimetype` to an HttpResponse object is deprecated since Django 1.5 and will throw an error in Django 1.7. `content_type` is supported since Django 1.0. --- adminsortable/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminsortable/admin.py b/adminsortable/admin.py index 2b73d93..8e55fa4 100644 --- a/adminsortable/admin.py +++ b/adminsortable/admin.py @@ -246,7 +246,7 @@ class SortableAdmin(SortableAdminBase, ModelAdmin): pass return HttpResponse(json.dumps(response, ensure_ascii=False), - mimetype='application/json') + content_type='application/json') class SortableInlineBase(SortableAdminBase, InlineModelAdmin):