{% for project in project_list %} {% now "Y-m-d" as todays_date %} {% if todays_date < project.end_date|date:"Y-m-d" %} {% with upcoming="yes" %} {% ifchanged upcoming %} {% if upcoming == "yes" %} {% if no_text %} {% else %}

    Running

    {% endif %} {% else %} {% if no_text %} {% else %}

    Past

    {% endif %} {% endif %} {% endifchanged %} {% endwith %} {% else%} {% with upcoming="no" %} {% ifchanged upcoming %} {% if upcoming == "yes" %} {% if no_text %} {% else %}

    Running

    {% endif %} {% else %} {% if no_text %} {% else %}

    Past

    {% endif %} {%endif%} {% endifchanged %} {%endwith%} {% endif %}
  • {% if project.image_project %}
    Cover
    Cover
    {% else %}
    {% endif %}
    {% if project.agency.image %}
    Cover
    Cover
    {% else %}
    {% endif %}
    {% if project.end_date %} {% if project.start_date < project.end_date %} Funding period: {{project.start_date}} to {{project.end_date}} {% else %} Funding period: {{project.start_date}} {% endif %} {% endif %}
    {{ project.name|safe}} {% if project.project_acr %}| {{project.project_acr}}{% endif %}
    Funded by {{project.agency.name}}
    {% if project.end_date %} {% if project.start_date < project.end_date %} Funding period: {{project.start_date}} to {{project.end_date}} {% else %} Funding period:{{project.start_date}} {% endif %} {% endif %}
    {{ project.name|safe}} {% if project.project_acr %}| {{project.project_acr}}{% endif %}
    Funded by {{project.agency.name}}
  • {% endfor %}