]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/decorators.py
Replace deprecated mimetype with content_type
[osqa.git] / forum / views / decorators.py
index 3bede665ddaf966b54829039accc29d1afb4ec6f..c99377c713b949a865748e7442b96d5bb3feed82 100644 (file)
@@ -49,7 +49,7 @@ class RefreshPageCommand(HttpResponse):
     def __init__(self):
         super(RefreshPageCommand, self).__init__(
                 content=json.dumps({'commands': {'refresh_page': []}, 'success': True}),
-                mimetype="application/json")
+                content_type="application/json")
 
 def command(func, request, *args, **kwargs):
     try:
@@ -77,7 +77,7 @@ def command(func, request, *args, **kwargs):
             }
 
     if request.is_ajax():
-        return HttpResponse(json.dumps(response), mimetype="application/json")
+        return HttpResponse(json.dumps(response), content_type="application/json")
     else:
         return HttpResponseRedirect(request.META.get('HTTP_REFERER', '/'))