To add an attribute only when it's value is true (such as disabled), use attrName?="${value}". If the value is true, the attribute will be added in the output ...
Create HTML with python 3 using a standard DOM API. Includes a python port of JavaScript for interoperability and tons of other cool features. A fast prototyping library.