]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
views: Use context dictionaries in 'help'
authorStephen Finucane <stephen.finucane@intel.com>
Tue, 15 Mar 2016 22:05:15 +0000 (22:05 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Fri, 25 Mar 2016 11:24:41 +0000 (11:24 +0000)
Remove the use of PatchworkRequestContext in this view as it is not
required and causes a 'RemovedInDjango110Warning' warning. This
requires the use of 'render', rather than 'render_to_response'.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Tested-by: Andy Doan <andy.doan@linaro.org>
patchwork/views/help.py

index cf14fe255858327e7f5b472424684d8a71a0ff46..1d42946446b4354eef59921e0e0a4df95bfb1fe8 100644 (file)
@@ -21,9 +21,7 @@ from __future__ import absolute_import
 
 from django.conf import settings
 from django.http import Http404
-from django.shortcuts import render_to_response
-
-from patchwork.requestcontext import PatchworkRequestContext
+from django.shortcuts import render
 
 
 help_pages = {
@@ -36,8 +34,7 @@ if settings.ENABLE_XMLRPC:
 
 
 def help(request, path):
-    context = PatchworkRequestContext(request)
     if path in help_pages:
-        return render_to_response(
-            'patchwork/help/' + help_pages[path], context)
+        return render(request,
+                      'patchwork/help/' + help_pages[path])
     raise Http404