| Home | Trees | Indices | Help |
|
|---|
|
|
PseudoSandbox with some additional functions, which are useful in the template. Additional functions: - "default" calls _default() - "exists": calls _exists()
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
Return the eval-result of expr or a "fallback"-value.
Use this in the template to use default-values for optional data.
The default-value is used if 'expr' does not exist/is invalid/results in None.
:Note: the variable-name has to be quoted! (like in eval)
:Example:
::
@! default("optional_var","fallback_value") !@
<!--(if default("optional",False))-->"YES"<!--(else)-->"NO"<!--(end)-->
<!--(for i in default("optional_list",[]))-->
|
Test if a variable exists. This tests if 'varname' exists in the current locals-namespace. :Note: the variable-name has to be quoted! (like in eval) This only works for single variable names. If you want to test complicated expressions, use i.e. _default. (i.e. _default("expr",False)) |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Aug 1 18:44:55 2012 | http://epydoc.sourceforge.net |