Hey, I discovered this library coming from Tim Schilling's post about the new simple_block_tag landing in Django 5.2, and it looks to match exactly how I think about "components" fitting in with the Django Template Language, so thank you!
My one request would be to add support for template filters in the arguments to {% bird %}. Currently, this kind of thing is not possible:
{% bird:prop count=None %}
<button class="btn btn-primary">
{% if count is not None %}<span class="badge badge-light">{{ count }}</span>{% endif %}
{{ slot }}
</button>
{% bird "button" count=users|length %}
Click me!
{% endbird %}
The component sees users|length as a single context variable and renders it as-is (due to the behaviour for missing variables). This is quite unexpected when you're used to how template filters work in other Django template tags, and it'd be great if it was supported.
Hey, I discovered this library coming from Tim Schilling's post about the new
simple_block_taglanding in Django 5.2, and it looks to match exactly how I think about "components" fitting in with the Django Template Language, so thank you!My one request would be to add support for template filters in the arguments to
{% bird %}. Currently, this kind of thing is not possible:The component sees
users|lengthas a single context variable and renders it as-is (due to the behaviour for missing variables). This is quite unexpected when you're used to how template filters work in other Django template tags, and it'd be great if it was supported.