From: Stephen Finucane Date: Tue, 15 Mar 2016 22:05:15 +0000 (+0000) Subject: views: Use context dictionaries in 'help' X-Git-Tag: v2.0.0-rc1~403 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f825bb189eb4fb60f5a24d1bfbcbd30f4035653f;p=thirdparty%2Fpatchwork.git views: Use context dictionaries in 'help' 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 Tested-by: Andy Doan --- diff --git a/patchwork/views/help.py b/patchwork/views/help.py index cf14fe25..1d429464 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