Releases: pelme/htpy
Releases Β· pelme/htpy
25.4.1
- Add the
Renderable
protocol, a consistent API to render anhtpy
object as HTML or to iterate over it.Element
,Fragment
,ContextProvider
, andContextConsumer
are allRenderable
. PR #92. Thanks to Stein Magnus Jodal (@jodal) and Dave Peck (@davepeck). - Deprecate
render_node()
anditer_node()
and direct iteration over elements. CallRenderable.__str__()
orRenderable.iter_chunks()
instead. Read the Usage docs for more details.
25.4.0
25.3.0
- Add
fragment
for explicitly grouping a collection of nodes. Read the Usage docs for more details. Fixes issue #82. See PR #86 and PR #95. Thanks to Thomas Scholtes (@geigerzaehler).
25.2.0
- Make Context's repr debug friendly PR #96. Thanks to Stein Magnus Jodal (@jodal).
- Context providers longer require wrapping nodes in a function/lambda. This simplifies context usage while still being backward compatible. Thanks to Thomas Scholtes (@geigerzaehler) for the patch. PR #83.
25.1.0
24.12.0
24.10.1
24.10.0
- Implement
Element.__html__
. This avoids double escaping when passed tomarkupsafe.escape
and Django'sdjango.utils.html.conditional_escape
. PR #65. - Raise errors directly on invalid children. This avoids cryptic stack traces. PR #56.
- Raise TypeError rather than ValueError when invalid types are passed as attributes or children. PR #59.
24.9.1
24.8.2
What's Changed
- Added support for passing data between components via Context. See the Usage docs for more information. PR #48.
- Added Django template backend. The Django template backend allows you to integrate htpy components directly with Django. See the docs for more information. PR #37.