diff mbox series

[3/5] settings: Add context processor django.template.context_processors.request

Message ID 20200827141406.18231-3-ajd@linux.ibm.com
State Accepted
Headers show
Series [1/5] templates: Replace ifequal and ifnotequal with if | expand

Commit Message

Andrew Donnellan Aug. 27, 2020, 2:14 p.m. UTC
Django 3.1 adds a new admin sidebar feature that requires the
django.template.context_processors.request context processor to be enabled
in the settings.

Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
---
 patchwork/settings/base.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Stephen Finucane Sept. 26, 2020, 10:50 a.m. UTC | #1
On Fri, 2020-08-28 at 00:14 +1000, Andrew Donnellan wrote:
> Django 3.1 adds a new admin sidebar feature that requires the
> django.template.context_processors.request context processor to be enabled
> in the settings.
> 
> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>

Compatible with Django 3.0 also. LGTM.

Reviewed-by: Stephen Finucane <stephen@that.guru>
diff mbox series

Patch

diff --git a/patchwork/settings/base.py b/patchwork/settings/base.py
index 001878acb134..c1bb9b27fac8 100644
--- a/patchwork/settings/base.py
+++ b/patchwork/settings/base.py
@@ -57,6 +57,7 @@  TEMPLATES = [
                 'django.template.context_processors.debug',
                 'django.template.context_processors.i18n',
                 'django.template.context_processors.media',
+                'django.template.context_processors.request',
                 'django.template.context_processors.static',
                 'django.template.context_processors.tz',
                 'django.contrib.messages.context_processors.messages',