Django templates check condition

Posted by Hulk on Stack Overflow See other posts from Stack Overflow or by Hulk
Published on 2010-04-08T10:50:32Z Indexed on 2010/04/08 10:53 UTC
Read the original article Hit count: 317

If there are are no values in the table how can should the code be to indicate no name found else show the drop down box in the below code

  {% for name in dict.names %}
  <option value="{{name.id}}" {% for selected_id in selected_name %}{% ifequal name.id selected_id %} {{ selected }} {% endifequal %} {% endfor %}>{{name.firstname}}</option>{% endfor %} 
   </select>

Thanks..

© Stack Overflow or respective owner

Related posts about django

Related posts about django-templates