Replies: 3 comments
-
I think i may have found a bug.. {% component "card-header-button" hrefs="{% url 'investor_vuw' id=1 %}" classes="ti-btn-danger" label="Cancel" %}{% endcomponent %} gives and error but {% component "card-header-button" hrefs="{% url 'investor_vuw' id=1 %}" classes="ti-btn-danger" label="Cancel" %} on two lines works ? Best |
Beta Was this translation helpful? Give feedback.
-
Nice catch! Wrote a fix in #673 I guess this has to do with how we implemented the nested template tags, e.g. |
Beta Was this translation helpful? Give feedback.
-
@colinrees This has now been released in https://github.com/EmilStenstrom/django-components/releases/tag/0.101 🎉 |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I have created a button component that i pass a href to.. Its working fine except when i try and pass the URL
{% component "card-header-button" hrefs="{% url 'investor_vuw' id=1 %}" classes="ti-btn-danger" label="Cancel" %}{% endcomponent %}
I am getting a TemplateSyntaxError('An error occured while rendering component 'card-header-button':\nTemplateSyntaxError("Component 'card-header-button' passed default fill content '_DJANGO_COMPONENTS_DEFAULT_SLOT'(i.e. without explicit 'fill' tag), even though none of its slots is marked as 'default'.")')
The component is inside a fill.
Simply passing a hard coded hrefs make it work so ...
{% component "card-header-button" hrefs="/" classes="ti-btn-danger" label="Cancel" %}{% endcomponent %}
works fine.
Any ideas
Beta Was this translation helpful? Give feedback.
All reactions