betty.render module¶
Provide the Render API.
- final class betty.render.RenderDispatcher¶
Bases:
objectDispatch content to a renderer that supports it.
Unsupported content is rendered as plain text to make it safe for inclusion in HTML.
- class betty.render.Renderer¶
Bases:
ABC,Plugin[RendererDefinition]Render content in a different media type to HTML.
- final class betty.render.RendererDefinition¶
Bases:
HumanFacingDefinition,PluginClsDefinition[Renderer]The renderer plugin type.
Plugin type ID
rendererDefinition
Built-in renderers:
- html (
Html) - HTML: The values of the following HTML attributes will automatically be replaced with the URLs generated from them where possible: href, and src
- plain-text (
PlainText) - Plain text
- __init__(plugin_id: ResolvableMachineName, *, label: ResolvableLocalizable, auto: bool = True, description: ResolvableLocalizable | None = None, requires: Requires = ())¶
- static type() PluginTypeDefinition[Self]¶
The plugin type definition.
- html (