>From template.py:

STATEMENT_NODES = {
    'for': ForNode,
    'while': BlockNode,
    'if': IfNode,
    'elif': ElifNode,
    'else': ElseNode,
    'def': DefNode,
    'code': CodeNode
}

KEYWORDS = [
    "pass",
    "break",
    "continue",
    "return"
]

TEMPLATE_BUILTIN_NAMES = [
    "dict", "enumerate", "float", "int", "bool", "list", "long", "reversed",
    "set", "slice", "tuple", "xrange",
    "abs", "all", "any", "callable", "chr", "cmp", "divmod", "filter",
"hex",
    "id", "isinstance", "iter", "len", "max", "min", "oct", "ord", "pow",
"range",
    "True", "False",
    "None",
    "__import__", # some c-libraries like datetime requires __import__ to
present in the namespace
]


On Wed, Sep 15, 2010 at 1:51 PM, Aydın ŞEN <[email protected]> wrote:

> 2010/9/15 Daniel Garcia <[email protected]>
>
>
>> You can add one function to template [1]:
>>
>> render = web.template.render('templates', globals={'zip': zip})
>>
>> [1] http://webpy.org/docs/0.3/templetor#builtins
>>
>>
>>
> Yeap, it is ok to add as global to render function.
> As documentation says: *"Some common builtin functions like range, min,
> max etc. and boolean values True and False are made available to all the
> templates"*
> Which built-in functions are available to all the templates, is there whole
> list somewhere?
>
>
>
> --
> Aydın Şen
>
>  --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected] <webpy%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.
>



-- 
http://www.wolfhowlmedia.com

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to