Don't show event as current when not accepting projects anymore
This commit is contained in:
parent
429903bedf
commit
e78b72e587
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue