diff --git a/shiftregister/app/views.py b/shiftregister/app/views.py index 83be945..e297a7e 100644 --- a/shiftregister/app/views.py +++ b/shiftregister/app/views.py @@ -4,6 +4,7 @@ from django.db import transaction from django.db.models import F, Count, Q, ExpressionWrapper from .forms import RegisterForm, EmptyForm from django.db.models.fields import DateTimeField +from datetime import timedelta from django.utils import timezone from django.conf import settings from django.contrib import messages @@ -50,7 +51,8 @@ def index(request): Shift.with_reg_count() .filter( help_wanted, - start_at__date=day.date(), + start_at__gte=day + timedelta(hours=6), + start_at__lte=day + timedelta(hours=30), start_at__gt=timezone.now(), deleted=False, )