diff options
author | Dominic DiTaranto <domdit@gmail.com> | 2024-11-17 17:15:18 -0500 |
---|---|---|
committer | Dominic DiTaranto <domdit@gmail.com> | 2024-11-17 17:15:18 -0500 |
commit | b7385a3c68789d3b77eb4a03868c9185fd1d4e8e (patch) | |
tree | 498f9664ff2f77922631794b22b46a3a0a66f516 /web | |
parent | c76633eb69cc31d7d1827dd6fd1b1bcb2a3f1c4b (diff) |
auto handle events
Diffstat (limited to 'web')
-rw-r--r-- | web/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/views.py b/web/views.py index 7331b4d..e35396c 100644 --- a/web/views.py +++ b/web/views.py @@ -2,17 +2,17 @@ from datetime import timedelta from django.contrib.auth import update_session_auth_hash from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import PasswordChangeForm -from django.contrib.auth.views import PasswordChangeView from django.shortcuts import get_object_or_404, redirect, render -from django.urls import reverse_lazy +from scripts.bp_deactivate import deactivate from web.models import Event, Availability @login_required() def index(request): + deactivate() parsed_events = [] - for active_event in Event.objects.filter(active=True).order_by('start_date'): + for active_event in Event.objects.filter(active=True).order_by('start_date')[:10]: data = { 'id': active_event.id, 'name': active_event.name, |