From b7385a3c68789d3b77eb4a03868c9185fd1d4e8e Mon Sep 17 00:00:00 2001 From: Dominic DiTaranto Date: Sun, 17 Nov 2024 17:15:18 -0500 Subject: auto handle events --- web/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web') 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, -- cgit v1.2.3-70-g09d2