Merge "Rewrite pieces of code deprecated by Django 1.7"
This commit is contained in:
commit
1fdac75d4f
@ -206,4 +206,4 @@ class SamplesView(TemplateView):
|
||||
ret['settings'] = {}
|
||||
|
||||
return HttpResponse(json.dumps(ret),
|
||||
mimetype='application/json')
|
||||
content_type='application/json')
|
||||
|
@ -94,7 +94,7 @@ def download_ec2_bundle(request):
|
||||
redirect=request.build_absolute_uri())
|
||||
|
||||
# Send it back
|
||||
response = http.HttpResponse(mimetype='application/zip')
|
||||
response = http.HttpResponse(content_type='application/zip')
|
||||
response.write(temp_zip.read())
|
||||
response['Content-Disposition'] = ('attachment; '
|
||||
'filename="%s-x509.zip"'
|
||||
|
@ -73,7 +73,7 @@ class GenerateView(View):
|
||||
_('Unable to create key pair: %(exc)s'),
|
||||
redirect=redirect)
|
||||
|
||||
response = http.HttpResponse(mimetype='application/binary')
|
||||
response = http.HttpResponse(content_type='application/binary')
|
||||
response['Content-Disposition'] = \
|
||||
'attachment; filename=%s.pem' % slugify(keypair.name)
|
||||
response.write(keypair.private_key)
|
||||
|
@ -134,7 +134,7 @@ def console(request, instance_id):
|
||||
except Exception:
|
||||
data = _('Unable to get log for instance "%s".') % instance_id
|
||||
exceptions.handle(request, ignore=True)
|
||||
response = http.HttpResponse(mimetype='text/plain')
|
||||
response = http.HttpResponse(content_type='text/plain')
|
||||
response.write(data)
|
||||
response.flush()
|
||||
return response
|
||||
|
@ -220,4 +220,4 @@ class JSONView(View):
|
||||
self.add_resource_url('horizon:project:routers:detail',
|
||||
data['routers'])
|
||||
json_string = json.dumps(data, ensure_ascii=False)
|
||||
return HttpResponse(json_string, mimetype='text/json')
|
||||
return HttpResponse(json_string, content_type='text/json')
|
||||
|
Loading…
Reference in New Issue
Block a user