]> git.ipfire.org Git - thirdparty/patchwork.git/commit
context: Add 'site' context processor
authorStephen Finucane <stephen.finucane@intel.com>
Mon, 21 Mar 2016 14:07:01 +0000 (14:07 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Fri, 25 Mar 2016 11:24:05 +0000 (11:24 +0000)
commit85cf2b8d09480a7bdc88bc1ebb2954f862c0f8b8
tree143aefd1c295c6acc9645d30eebaeb1018f4ec53
parent1836576a199952130822b2b9490032116b068a5c
context: Add 'site' context processor

This allows us to use the current "site" value in all templates without
requiring PatchworkRequestContext. As a custom context processor is
being enabled, the 'TEMPLATE_CONTEXT_PROCESSORS' value must be
specified for versions of Django < 1.8 (it's already specified for
other versions).

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Tested-by: Andy Doan <andy.doan@linaro.org>
patchwork/context_processors.py [new file with mode: 0644]
patchwork/requestcontext.py
patchwork/settings/base.py