dj_angles.tags¶
Module Contents¶
- class dj_angles.tags.Tag(tag_map: dict[str | None, collections.abc.Callable | str] | None, html: str, tag_name: str, template_tag_args: str, tag_queue: collections.deque | None = None)¶
Encapsulates metadata and functionality for a tag that will be processed by dj-angles.
- tag_name: str¶
The portion of the tag’s element name after the initial identifier (which defaults to ‘dj-‘).
Examples
‘include’ for ‘<dj-include />’
‘partial’ for ‘<dj-partial />’
- attributes: dj_angles.attributes.Attributes¶
The parsed attributes of the template tag.
- django_template_tag¶
- parse_attributes()¶
Creates Attributes based on the template tag arguments.
- get_django_template_tag(slots: list[tuple[str, minestrone.Element]] | None = None) → str¶
Generate the Django template tag.
- Parameters:
slots (param) – List of slots which is a tuple of slot name and inner html.
- get_wrapping_tag_name(name: str | None = None) → str¶
Get the wrapping tag name.
- Parameters:
name (param) – The name for the wrapping tag.
- property is_include¶
Whether the Django template tag is include.
- property component_name¶
Legacy property for tag_name. Deprecated.