diff --git a/aircox/models/log.py b/aircox/models/log.py index a58f2fe..9bf0e5b 100644 --- a/aircox/models/log.py +++ b/aircox/models/log.py @@ -33,6 +33,9 @@ class LogQuerySet(models.QuerySet): def after(self, date): return self.filter(date__gte=date) if isinstance(date, tz.datetime) else self.filter(date__date__gte=date) + def before(self, date): + return self.filter(date__lte=date) if isinstance(date, tz.datetime) else self.filter(date__date__lte=date) + def on_air(self): return self.filter(type=Log.TYPE_ON_AIR) diff --git a/aircox/templates/aircox/dashboard/statistics.html b/aircox/templates/aircox/dashboard/statistics.html index 785de35..4e17766 100644 --- a/aircox/templates/aircox/dashboard/statistics.html +++ b/aircox/templates/aircox/dashboard/statistics.html @@ -6,15 +6,20 @@ {% block content-container %}
-{# TODO: date subtitle #} -{% comment %} - -{% endcomment %} - +
+

{% translate "Filter by date" %}

+
+
+ + +
+
+ + +
+ +
+