From 9d3e068b0c1587a981c0fcafb781a820662df72d Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Tue, 15 Dec 2015 17:16:01 +0000 Subject: [PATCH] Use Django 1.8 TEMPLATES setting in settings doc Also, the ``request`` context processor is now in the defaults --- docs/reference/contrib/settings.rst | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/reference/contrib/settings.rst b/docs/reference/contrib/settings.rst index baf959171..9f821d0c5 100644 --- a/docs/reference/contrib/settings.rst +++ b/docs/reference/contrib/settings.rst @@ -93,16 +93,25 @@ If access to a setting is required in the code, the :func:`~wagtail.contrib.sett Using in templates ------------------ -Add the ``request`` and ``settings`` context processors to your settings: +Add the ``settings`` context processor to your settings: .. code-block:: python - from django.conf import global_settings - TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + [ - 'django.core.context_processors.request', - 'wagtail.contrib.settings.context_processors.settings', + TEMPLATES = [ + { + ... + + 'OPTIONS': { + 'context_processors': [ + ... + + 'wagtail.contrib.settings.context_processors.settings', + ] + } + } ] + Then access the settings through ``{{ settings }}``: .. code-block:: html+django