{% extends 'base.html' %} {% from "_helpers.html" import render_tags, render_delta %} {% block heading %} Activity Drift Report {% endblock %} {% block content %} {% for x in range(0,24) %} {% endfor %} {% for date in sleep_drift|sort %} {% for hour in sleep_drift[date] %} {% if hour.duration %} {% if hour.duration.total_seconds() < 60*30 %} {% else %} {% endif %} {% else %} {% if hour.is_current %} {% else %} {% endif %} {% endif %} {% endfor %} {% endfor %}
Day Total{{ '{0:0>2}'.format(x) }}
{{ date }} {{ sleep_drift[date].duration }}  now 
{% endblock %}