User Tools

Site Tools


devel:blueprints:django_template

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
devel:blueprints:django_template [2010/01/13 10:50]
eide template variables
devel:blueprints:django_template [2010/01/13 12:04]
eide End code block
Line 10: Line 10:
  
 Some features of the templates, such as debug, version number and account/​user info and preferences requires context processors. Some features of the templates, such as debug, version number and account/​user info and preferences requires context processors.
 +
 +Context processors are not passed to templates by default with render_to_response(),​ a RequestContext object must be passed to render_to_response to get them.
 +
 +Without the account_processor all user specific content in templates will not work.
 +
 +<​code>​
 +render_to_response(
 +    '​path/​to/​template',​
 +     ​{'​some_context':​ var},
 +     ​RequestContext(request)
 +)
 +</​code>​
  
 Currently these context processors are: debug, account and nav_version. Currently these context processors are: debug, account and nav_version.
devel/blueprints/django_template.txt ยท Last modified: 2010/01/13 12:16 by eide