I noticed that the django templates already have certain variables passed to it without you having to send any data. For instance, the 'user' variable can be called without sending any 'user' data to the template when rendering.
Is there somewhere where I can find a list of these 'default variables'?
The
TEMPLATE_CONTEXT_PROCESSORS
setting contains the following values by default (in Django 1.6):The above is a list of context processors. A context processor is a function which can add more variables to the context which is passed to each template.
For example, the variable
user
is added by"django.contrib.auth.context_processors.auth"
.