{% if not projects|length_is:1 %} Projects expiring! {% else %} Project expiring in {{ projects.0.projectbillingdetails.expires_on|timeuntil:today }}! {% endif %}

Dear PI,

{% if not projects|length_is:1 %} The following projects are set to expire soon: {% else %} Your project {{ projects.0.projectbillingdetails.name }} is set to expire on {{ projects.0.projectbillingdetails.expires_on }}. {% endif %}

{% if projects %} {% regroup projects by projectbillingdetails.expires_on as projects_by_expiration %} {% for project_by_expiration in projects_by_expiration %} in {{ project_by_expiration.grouper|timeuntil:today }} ({{ project_by_expiration.grouper }}):
    {% for project in project_by_expiration.list %}
  • {{ project.projectbillingdetails.name }}
  • {% endfor %}
{% endfor %} {% endif %}

Please contact the facility accounting department to make sure you don't lose access to the facility.