dominate
dominate copied to clipboard
Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API. It allows you to write HTML pages in pure Python very concisely, which eliminate the need to learn...
It seems acceptable to also have attributes without values, e.g. the `controls` attribute for the video tag: https://www.w3schools.com/html/html5_video.asp ``` ... ``` Is this possible with dominate? If so I am...
For example, I'd expect the following to generate `foo`: ```python from dominate.tags import * b = button("foo") with b: attr(className = "bar") attr(className = "baz") print(b) ``` ```html foo ```...
May want to consider programmatically constructing classes using https://developer.mozilla.org/en-US/docs/Web/HTML/Element For reference, this is how the `{htmltools}` package queries all non-obsolete tags https://github.com/rstudio/htmltools/blob/bc226a3/scripts/generate_known_tags.R#L37 Happy to stab at a PR there's interest...
In HTML5 it is recommended to explicitly specify the character encoding with a `meta` element in the `head`: ````html ```` To make sure this encoding is also applied to the...
Create a barebones website which it is easy to get started with.
WIP This update duplicates how the style attribute is accessed when writing javascript. This is a nice feature to have for the people that are familiar with it. While I...
thanks for this; its great One note, in your examples you do >>> from dominate.tags import * but your tag names ( and I understand you got them from html...
Hello, Would it be feasible to add type hints for all or part of the code? For example, if I call the `.render()` method on a `document`, mypy infers the...
This change https://github.com/Knio/dominate/commit/d72dca859ee4ed9113ce133fcd7d3c28cc54f54e introduced dependency on contextvars package, that is not installed by `pip3 install dominate`.
Is there a way to have Dominate automatically treat None as an empty string?