Package web2py :: Package gluon :: Module template |
[hide private]
[frames] | no frames]

# Module template

source code

    This file is part of the web2py Web Framework (Copyrighted, 2007-2011).
    License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

    Author: Thadeus Burgess

    Contributors:

    - Thank you to Massimo Di Pierro for creating the original gluon/template.py
    - Thank you to Jonathan Lundell for extensively testing the regex on Jython.
    - Thank you to Limodou (creater of uliweb) who inspired the block-element support for web2py.

Classes | [hide private]
| Node Basic Container Object
| SuperNode
| BlockNode Block Container.
| Content Parent Container -- Used as the root level BlockNode.
| TemplateParser

Functions | [hide private]
parse_template(filename, path=`'``views/``'`, context=`{``}`, lexers=`{``}`, delimiters=`(``'``{{``'``,` `'``}}``'``)`) filename can be a view filename in the views folder or an input stream path is the path of a views folder context is a dictionary of symbols used to render the template | source code
get_parsed(text) Returns the indented python code of text. | source code
render(content=`'``hello world``'`, stream=1, filename=1, path=1, context=`{``}`, lexers=`{``}`, delimiters=`(``'``{{``'``,` `'``}}``'``)`) | source code

Function Details | [hide private]

### get_parsed(text) | source code
Returns the indented python code of text. Useful for unit testing.