[PATCH 04/15] views: Use context dictionaries in 'help'
Stephen Finucane
stephen.finucane at intel.com
Fri Mar 25 04:52:49 AEDT 2016
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 at intel.com>
---
patchwork/views/help.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/patchwork/views/help.py b/patchwork/views/help.py
index cf14fe2..1d42946 100644
--- a/patchwork/views/help.py
+++ b/patchwork/views/help.py
@@ -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
--
2.0.0
More information about the Patchwork
mailing list