Context ProcessorsΒΆ

The context_processor supplied by basky will inject a template variable into your templates, the name of which will be basket. If you’ve set BASKY_SESSION_KEY_NAME to customise your installation then the template variable will whatever you’ve set BASKY_SESSION_KEY_NAME to.

For example:

<p>
        You have {{basket.total_items}}
        items{{basket.total_items|pluralize}}
        in your basket.
</p>

To use the basky.context_processor.basket make sure that it’s in the list of context_processors in your settings file.:

TEMPLATE_CONTEXT_PROCESSORS = (
        #...
        'basky.context_processors.basket'
)