django22: Replace 'render_to_response' with 'render'

Per the Django 2.0 release notes [1]:

  'django.shortcuts.render_to_response()' is deprecated in favor of
  'django.shortcuts.render()'. 'render()' takes the same arguments
  except that it also requires a request.

[1] https://docs.djangoproject.com/en/2.2/releases/2.0/#id1

Change-Id: I2b66a23df6b6f3f389054515fe948828ec5cba40
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2019-08-27 09:59:53 +01:00 committed by Akihiro Motoki
parent a96c6e34cf
commit 1d1c6ce4d2
1 changed files with 2 additions and 1 deletions

View File

@ -698,7 +698,8 @@ class DownloadTransferCreds(generic.View):
'id': transfer_id, 'id': transfer_id,
'auth_key': auth_key, 'auth_key': auth_key,
}} }}
response = shortcuts.render_to_response( response = shortcuts.render(
request,
'project/volumes/download_transfer_creds.html', 'project/volumes/download_transfer_creds.html',
context, content_type='application/text') context, content_type='application/text')
response['Content-Disposition'] = ( response['Content-Disposition'] = (