diff --git a/docs/index.rst b/docs/index.rst index 15057ac..39815c0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -209,7 +209,7 @@ pass the object to the template context: def myview(request): return render(request, 'my_template.html', {'config': config}) -Or you can use the included config context processor.: +Or you can use the included config context processor. For Django pre-1.8, this looks like this: .. code-block:: python @@ -218,6 +218,8 @@ Or you can use the included config context processor.: 'constance.context_processors.config', ) +For Django 1.8 and above, insert ``'constance.context_processors.config'`` at the top of your ``TEMPLATES['OPTIONS']['context_processors']`` list. See (See the `Django documentation`_ for details. + This will add the config instance to the context of any template rendered with a ``RequestContext``.