There are several global variables that are flagged by default in the context of templates ( here is a complete list), one of them is config , which allows you to access the application configuration from templates. As a dictionary, it can be accessed using the syntax config['MY_CONFIGURATION'] or config.MY_CONFIGURATION (this syntax for accessing dict elements is specific to Jinja).
On the other hand, if you want to pass arbitrary data to your templates without having to pass them explicitly in each view, you will have to use contextual processors .
MatToufoutu Aug 18 '11 at 8:44 2011-08-18 08:44
source share