diff --git a/PyRIGS/views.py b/PyRIGS/views.py index fe7a44e0..372e1af0 100644 --- a/PyRIGS/views.py +++ b/PyRIGS/views.py @@ -48,6 +48,7 @@ class Index(generic.TemplateView): # Displays the current rig count along with def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['rig_count'] = models.Event.objects.rig_count() + context['now'] = models.Event.objects.events_in_bounds(timezone.now(), timezone.now()) return context diff --git a/templates/index.html b/templates/index.html index 497c1fb9..00e6fd5f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -8,6 +8,11 @@

Rig Information Gathering System

Welcome back {{ user.get_full_name }}, there {%if rig_count == 1 %}is one rig coming up{%else%}are {{ rig_count|apnumber }} rigs coming up.{%endif%}

+
+ {% for event in now %} + Event {{ event }} is happening now! Check In
+ {% endfor %} +
Some lights and haze, very purple