diff options
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, |