Monday, September 22, 2014

Re: Testting field.label_tag

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJUH/uOAAoJEB267zEX1rwQbfoP/3zECApBLLG+sj/YgddynXmE
1fk9X/kZ30/n90RHP5ee/Xh0Pb37Yah6Szxgvku+3kZIWnja+v0LVTbNNIdcReb/
d+bfoxLlJBWFbejRjlTnvNd65nbFQF51OYFxbo8PAJXpeYvlVbibdmYdxCsACCBr
hqAYPypI3oe6FCuCn/j1fCCVhNAevlqDH4LEjmFAFKm6OsZJFt513iMqx6hZn2r3
Xyt+ZFAtUPXy2qkSUeJzZKCetq8NKG2eVJYlBhy7SozMYaral47JD6GEWTZfXyOO
6Z9KqzoGVBDDZq/WRNGZ1yWjun7fDV+UJ9G4MdNgbBULyOCK7Kbsn0lwfAhsIp30
rZqNFnbpW9lh5/Li9N9Lms8RpclzAui9K0GE35oHpD4pT073ViAlrQK06t2NQKkN
kPDwUx34D8pkavUnGy9nMLDRry+gz2ioj8hTptJHujvmXHHbFs66/1PobXs2jPTA
of5oxVwfumWbq2BMBJdR5A2Noxy5IBHY4Hwxf3q2e358POuerHipY+225Lgy0BfJ
XrXPJY/apFv3yOb+tz7kCvU/mOLK5+yO8F+iL0MC6UIVpL8XbHJFOrntU2dyIEAZ
RLGCnACA+tKjg2eR0TWWVWv8HE+EznnGO0aL3uh+zfvYmNCRWY/a33gEMifQJDlP
bn+vYZ3BOy3igIxV5HtY
=NpbM
-----END PGP SIGNATURE-----
Use the attribute 'label' rather than 'label_tal'. The latter is the HTML element.

Do:

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

Cheers

On 22 Sep 2014, at 10:51, Salvatore DI DIO <salvatore.didio@gmail.com> wrote:

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


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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.

No comments:

Post a Comment