From e78b72e58717d3b3d4ab11a163cf6cae993500a3 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 13 May 2022 10:46:08 +0200 Subject: [PATCH] Don't show event as current when not accepting projects anymore --- scratch_show/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scratch_show/views.py b/scratch_show/views.py index c5c09c3..cb02f8a 100644 --- a/scratch_show/views.py +++ b/scratch_show/views.py @@ -14,8 +14,8 @@ class IndexView(TemplateView): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) today = timezone.now().date() - context['current_event'] = models.Event.objects.filter(date=today).first() - context['past_events'] = models.Event.objects.exclude(date=today).order_by('-date') + context['current_event'] = models.Event.objects.filter(date=today, accept_projects=True).first() + context['past_events'] = models.Event.objects.exclude(date=today, accept_projects=True).order_by('-date') return context