6.1.1 Tag Objects
- raise_error(msg)
-
Raises a TemplateError exception using the string in the
msg argument.
- has_attrib(name)
-
Returns
TRUE
if the attribute specified in the name
argument was defined for the tag. All attribute names are converted
to lower case by the template parser.
- assert_has_attrib(name)
-
If the attribute specified in the name argument is not defined
for the tag a TemplateError exception will be raised.
- get_attrib(name [, default
= None
])
-
Retrieves the value of the attribute specified in the name
argument.
- set_attrib(name, value)
-
Sets the value of the attribute named in the name argument to
the value in the value argument.
- attrib_items()
-
Returns a list of attribute name, value tuples which are defined for
the tag.
- write_attribs_except(ctx [, ...])
-
Sends all tag attributes to the write_content() method of the
execution context in the ctx argument. Any attributes named in
additional arguments will not be written.