django-context-extras Help
========================================================================
This file contains detailed information on how to configure and use
``django-context-extras``.


Configuration
=============
This section contains instructions about how to configure this application.
If you haven't installed it yet, please go through the INSTALL document
before proceeding any further.

``django-context-extras`` requires no special configuration, apart from
adding it to the ``INSTALLED_APPS`` in your project's ``settings.py`` file::

    INSTALLED_APPS = (
        ...
        'context_extras',
    )


Context Processors
==================
In order to use the provided context processors it is required that you add
them to the list of the context processors your project uses.

Django, by default, uses the following `context processors`__::

    TEMPLATE_CONTEXT_PROCESSORS = (
        "django.contrib.auth.context_processors.auth",
        "django.core.context_processors.debug",
        "django.core.context_processors.i18n",
        "django.core.context_processors.media",
        "django.contrib.messages.context_processors.messages"
    )

__ http://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors

The context processors provided by ``django-context-extras`` are:

1. current_site context processor
---------------------------------
Adds the current **site** object to the template context.

To add the *current_site* context processor to your project, add the
``context_extras.context_processors.current_site`` module in the
``TEMPLATE_CONTEXT_PROCESSORS`` setting in your ``settings.py`` file::

    TEMPLATE_CONTEXT_PROCESSORS = (
        ...
        'context_extras.context_processors.current_site',
        ...
    )

2. project_settings context processor
-------------------------------------
Adds the project's **settings** object to the template context.

To add the *project_settings* context processor to your project, add the
``context_extras.context_processors.project_settings`` module in the
``TEMPLATE_CONTEXT_PROCESSORS`` setting in your ``settings.py`` file::

    TEMPLATE_CONTEXT_PROCESSORS = (
        ...
        'context_extras.context_processors.project_settings',
        ...
    )

