The horizon.utils.html ModuleΒΆ

class horizon.utils.html.HTMLElement[source]

Bases: object

A generic base class that gracefully handles html-style attributes.

HTMLElement.attr_string[source]

Returns a flattened string of HTML attributes based on the attrs dict provided to the class.

HTMLElement.class_string[source]

Returns a list of class name of HTML Element in string

HTMLElement.get_default_attrs()[source]

Returns a dict of default attributes which should be combined with other declared attributes.

HTMLElement.get_default_classes()[source]

Returns an iterable of default classes which should be combined with any other declared classes.

HTMLElement.get_final_attrs()[source]

Returns a dict containing the final attributes of this element which will be rendered.

Previous topic

The horizon.utils.filters Module

Next topic

The horizon.utils.fields Module

This Page