-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
🏋️ improvementEnhancements or optimizations to existing functionalityEnhancements or optimizations to existing functionality👶 good first issueGood for newcomersGood for newcomers
Description
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.
Metadata
Metadata
Assignees
Labels
🏋️ improvementEnhancements or optimizations to existing functionalityEnhancements or optimizations to existing functionality👶 good first issueGood for newcomersGood for newcomers