The horizon.utils.html ModuleΒΆ

class horizon.utils.html.HTMLElement[source]

Bases: object

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

attr_string[source]

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

attr_string_nc[source]

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

class_string[source]

Returns a list of class name of HTML Element in string.

get_default_attrs()[source]

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

get_default_classes()[source]

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

get_final_attrs(classes=True)[source]

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

get_final_css()[source]

Returns a final css class concatenated string.

Previous topic

The horizon.utils.functions Module

Next topic

The horizon.utils Module

Project Source

This Page