| Home | Trees | Indices | Help |
|
|---|
|
|
Template processing for TurboGears view templates.
|
|||
| MetaDeprecatedVariableProviders | |||
| DeprecatedVariableProviders | |||
|
cycle Loops forever over an iterator. |
|||
|
UserAgent Representation of the user's browser. |
|||
|
DeprecatedBunch Wraps access with a deprecation warning. |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
log = logging.getLogger("turbogears.view")
|
|||
baseTemplates =
|
|||
variable_providers = []
|
|||
root_variable_providers =
|
|||
engines =
|
|||
variableProviders = []
|
|||
|
|||
Renders data in the desired format.
|
Load base templates for use by other templates. By listing templates in turbogears.view.baseTemplates, these templates will automatically be loaded so that the "import" statement in a template will work. |
If the expression is true, return the string 'selected'. Useful for HTML <option>s. |
If the expression is true, return the string "checked". This is useful for checkbox inputs. |
Lets you look at the first item in an iterator. This is a good way to verify that the iterator actually contains something. This is useful for cases where you will choose not to display a list or table if there is no data present. |
Create a Bunch of variables that should be available in all templates.
These variables are:
useragent
a UserAgent object with information about the browser
selector
the selector function
checker
the checker function
tg_js
the path to the JavaScript libraries
ipeek
the ipeek function
cycle
cycle through a set of values
quote_plus
the urllib quote_plus function
url
the turbogears.url function for creating flexible URLs
identity
the current visitor's identity information
session
the current cherrypy.session if the session_filter.on it set
in the app.cfg configuration file. If it is not set then session
will be None.
locale
the default locale
inputs
input values from a form
errors
validation errors
request
the cherrypy request
config
the cherrypy config get function
Additionally, you can add a callable to turbogears.view.variable_providers
that can add more variables to this list. The callable will be called with
the vars Bunch after these standard variables have been set up.
|
Load and initialize all templating engines. This is called during startup after the configuration has been loaded. You can call this earlier if you need the engines before startup; the engines will then be reloaded with the custom configuration later. |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat Apr 19 13:58:25 2008 | http://epydoc.sourceforge.net |