Template tags have one-to-one correspondence with HTML tags. On top of that plugins can extend tag definitions, adding composite tags, by implementing tayra.interfaces.ITayraTags interface specification. An example of this can be found in tayra.tags.forms.HTML5Forms plugin. Plugins wanting to implement ITayraTags interface must derive from the base class Tags defined in this module. The base class defines standard specifier tokens common to all template tags, also gracefully handles undefined tags in safest possible way.
Tag meta syntax,:
<tagname list-of-specifiers { inline-css-style } list-of-attributes>
tokens that will be translated to attribute values.
token Equivalent attribute pairs edit contenteditable=”true” noedit contenteditable=”false” dragcopy draggable=”true” dragzone=”copy” dragmove draggable=”true” dragzone=”move” draglink draggable=”true” dragzone=”link” nodrag draggable=”false” hidden hidden spellcheck spellcheck=”true” nospellcheck spellcheck=”false” ltr dir=”ltr” rtl dir=”rtl” disabled disabled=”disabled” checked checked=”checked” readonly readonly=”readonly” selected selected=”selected” multiple multiple=”multiple” defer defer=”defer”
Bases: pluggdapps.plugin.Plugin
Base class for all plugins wanting to handle template tags. Since the base class declares that it implements tayra.interfaces.ITayraTags interface, deriving plugins need not do the same.
pluggdapps.plugin.ISettings.default_settings() interface method.
pluggdapps.plugin.ISettings.default_settings() interface method.
This method is expected to be overriden by the deriving plugin class, only for undefined template tags this method will be called, after trying with other plugins in the list of tag.plugins.
pluggdapps.plugin.ISettings.normalize_settings() interface method.
The base class provides standard set of tokens and specifiers that are common to most HTML tags. To parse these tokens into tag-attributes, deriving plugins can use this method.