class documentation

class Token:

View In Hierarchy

Undocumented

Method __init__ A token representing a string from the template.
Method __repr__ Undocumented
Method split​_contents Undocumented
Instance Variable contents Undocumented
Instance Variable lineno Undocumented
Instance Variable position Undocumented
Instance Variable token​_type Undocumented
def __init__(self, token_type, contents, position=None, lineno=None):

A token representing a string from the template.

token_type
A TokenType, either .TEXT, .VAR, .BLOCK, or .COMMENT.
contents
The token source string.
position
An optional tuple containing the start and end index of the token in the template source. This is used for traceback information when debug is on.
lineno
The line number the token appears on in the template source. This is used for traceback information and gettext files.
def __repr__(self):

Undocumented

def split_contents(self):

Undocumented

contents =

Undocumented

lineno =

Undocumented

position =

Undocumented

token_type =

Undocumented