django - Why this object is not showing in my template? -
i'm creating gantt chart , can see tasks in table - if task.end_date
lower or equal last element of list of dates
.
if higher django doesn't display specific task on table.
""" dates = [ datetime.date(2015, 8, 5), datetime.date(2015, 8, 6), datetime.date(2015, 8, 7), datetime.date(2015, 8, 8), datetime.date(2015, 8, 9), datetime.date(2015, 8, 10), datetime.date(2015, 8, 11), datetime.date(2015, 8, 12), datetime.date(2015, 8, 13), datetime.date(2015, 8, 14) ] """ {% date in dates %} <td> {% task in person.tasks %} {% if task.start_date <= date , date <= task.end_date %} #if task.end_date higher datetime.date(2015, 8, 14) task won't show in table {{ task.task.name }} {% endif %} {% endfor %} </td> {% endfor %}
Comments
Post a Comment