Sunday, December 11, 2011

Django tips: Template context processors

Django tips: Template context processors: "Enter RequestContext and context processors

As it turns out, Django provides an extremely easy way to do this. Every time you render a template, you give it a “context”; this is a dictionary-like object whose keys are variable names and whose values are the values of the variables. When you render a template with a given context, every key in the context dictionary becomes a variable in the template that you can access and use."

'via Blog this'