class Template: (source)
Undocumented
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | compile |
Parse and compile the template source into a nodelist. If debug is True and an exception occurs during parsing, the exception is annotated with contextual line information where it occurred in the template source. |
Method | get |
Return a dictionary containing contextual line information of where the exception occurred in the template. The following information is provided: |
Method | render |
Display stage -- can be called many times |
Instance Variable | engine |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | nodelist |
Undocumented |
Instance Variable | origin |
Undocumented |
Instance Variable | source |
Undocumented |
Method | _render |
Undocumented |
Parse and compile the template source into a nodelist. If debug is True and an exception occurs during parsing, the exception is annotated with contextual line information where it occurred in the template source.
Return a dictionary containing contextual line information of where the exception occurred in the template. The following information is provided: message The message of the exception raised. source_lines The lines before, after, and including the line the exception occurred on. line The line number the exception occurred on. before, during, after The line the exception occurred on split into three parts: 1. The content before the token that raised the error. 2. The token that raised the error. 3. The content after the token that raised the error. total The number of lines in source_lines. top The line number where source_lines starts. bottom The line number where source_lines ends. start The start position of the token in the template source. end The end position of the token in the template source.