devel:blueprints:django_template
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
devel:blueprints:django_template [2010/01/13 10:50] – template variables eide | devel:blueprints:django_template [2010/01/13 12:16] (current) – a little 'bout the base template eide | ||
---|---|---|---|
Line 5: | Line 5: | ||
===== Django systems ===== | ===== Django systems ===== | ||
- | Something smart here | + | In the lib-python directory there' |
+ | |||
+ | base.html provides the header and footer for pages, so subsystems need only contribute the content. | ||
==== Context processors ==== | ==== Context processors ==== | ||
Line 11: | Line 13: | ||
Some features of the templates, such as debug, version number and account/ | Some features of the templates, such as debug, version number and account/ | ||
- | Currently these context | + | Context |
- | === Debug === | + | Without the account_processor all user specific content in templates will not work. |
- | Provides a SQL debug table at the bottom of every Django page if the DEBUG setting is set to true. | + | < |
+ | render_to_response( | ||
+ | 'path/to/ | ||
+ | | ||
+ | | ||
+ | ) | ||
+ | </ | ||
- | === Account_processor === | + | ^ NAV context processors |
- | + | | debug | Provides | |
- | Provides the account object for the current user, a flag telling if he/she is an admin, messages for the user and the custom | + | | account_processor | Provides |
- | + | | nav_version | |
- | === nav_version | + | | toolbar | All available tools from the toolbox (not enabled by default) | |
- | + | ||
- | Returns the version number from nav.web.buildconf | + | |
==== Template blocks and variables ==== | ==== Template blocks and variables ==== | ||
Line 54: | Line 60: | ||
Compability with Django templates are done seamless. The MainTemplate includes nav.webfront.compability.Cheetah which provides two methods called footer and header. These two methods are simply printed, and thus the header and footer appears. | Compability with Django templates are done seamless. The MainTemplate includes nav.webfront.compability.Cheetah which provides two methods called footer and header. These two methods are simply printed, and thus the header and footer appears. | ||
+ | |||
+ | MainTemplate will automatically populate the needed instance variables for the Cheetah compability class. | ||
==== Additional < | ==== Additional < |
devel/blueprints/django_template.1263379829.txt.gz · Last modified: by eide