Browse Source

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>
tags/16.0.0.0b2
Stephen Finucane 3 weeks ago
parent
commit
1d1c6ce4d2
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      openstack_dashboard/dashboards/project/volumes/views.py

+ 2
- 1
openstack_dashboard/dashboards/project/volumes/views.py View File

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

Loading…
Cancel
Save