Actually I want to remove the heading of my table in templates if it
is not filled. I have done this using this coding:
{% for test in st|slice:":1" %}<th>S.No</th>
  {% ifnotequal test.Description "" %}   <th>Description</th>{% endifnotequal %}
  {% ifnotequal test.Thickness "" %}    <th>Thickness</th>{% endifnotequal %}
  {% ifnotequal test.Comp_Strength_MPa "" %}    <th>Compressive
Strength(Mpa)</th>{% endifnotequal %}
                {% endfor  %}</tr>

but the problem which I am facing that if I dont enter the value in
first row and add that vale in second row then it does not show the
heading but shows the value.
I want that my headings should appear single time in table but it if
there is some value in second row then it should display its heading.



--
Harjot Kaur Mann
Blog: http://harjotmann.wordpress.com/

-- 
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+unsubscr...@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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to