Testting field.label_tag

28 views
Skip to first unread message

Salvatore DI DIO

unread,
Sep 22, 2014, 4:51:59 AM9/22/14
to django...@googlegroups.com
Hello,

I woulk like to test field.label_tag in the  fieldset.html template

For example I want to do:

{% if field.label_tag != 'Tags' %}
    {{ field.label_tag }}
{% endif %}

But that seems to not work
 
Thanks for your suggestions

mb...@danir.us

unread,
Sep 22, 2014, 7:35:42 AM9/22/14
to django...@googlegroups.com
Use the attribute ‘label’ rather than ‘label_tag’. The latter is the HTML element.

Do:

{% if field.label != 'Tags' %}
    {{ field.label_tag }}
{% endif %}

Cheers


Daniel Rus Morales

unread,
Sep 22, 2014, 8:05:33 AM9/22/14
to django...@googlegroups.com
Use the attribute ‘label’ rather than ‘label_tal’. The latter is the HTML element.

Do:

{% if field.label != 'Tags' %}
    {{ field.label_tag }}
{% endif %}

Cheers

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f49e012b-34f7-4ca6-adf4-9663a9a626af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

Salvatore DI DIO

unread,
Sep 22, 2014, 4:15:11 PM9/22/14
to django...@googlegroups.com
Thank Daniel

Salvatore DI DIO

unread,
Sep 22, 2014, 4:15:31 PM9/22/14
to django...@googlegroups.com
Thank you
Reply all
Reply to author
Forward
0 new messages