class documentation

class HtmlTemplate(Template): (source)

Constructor: HtmlTemplate(name, text)

View In Hierarchy

HTML template that works with the Twisted templating system and use xml.dom.minidom to parse the pydoctor-template-version meta tag.

Method __init__ Undocumented
Instance Variable loader Object used to render the final HTML file with the Twisted templating system.
Instance Variable text Contents of the template file as UFT-8 decoded str.
Instance Variable version Template version, -1 if no version could be read in the XML file.
Static Method _extract_version Undocumented
Instance Variable _dom Undocumented

Inherited from Template:

Class Method fromdir Scan a directory for templates.
Class Method fromfile Create a concrete template object. Type depends on the file extension.
Instance Variable name Template filename, may include subdirectories.
def __init__(self, name: str, text: str): (source)

Object used to render the final HTML file with the Twisted templating system.

This is a ITemplateLoader.

Contents of the template file as UFT-8 decoded str.

Template version, -1 if no version could be read in the XML file.

HTML Templates should have a version identifier as follow:

    <meta name="pydoctor-template-version" content="1" />

The version indentifier should be a integer.

@staticmethod
def _extract_version(dom: minidom.Document, template_name: str) -> int: (source)

Undocumented

_dom: minidom.Document | None = (source)

Undocumented