show late shifts in the previous day
This commit is contained in:
parent
e7029e4002
commit
75d71f082d
|
@ -4,6 +4,7 @@ from django.db import transaction
|
||||||
from django.db.models import F, Count, Q, ExpressionWrapper
|
from django.db.models import F, Count, Q, ExpressionWrapper
|
||||||
from .forms import RegisterForm, EmptyForm
|
from .forms import RegisterForm, EmptyForm
|
||||||
from django.db.models.fields import DateTimeField
|
from django.db.models.fields import DateTimeField
|
||||||
|
from datetime import timedelta
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
|
@ -50,7 +51,8 @@ def index(request):
|
||||||
Shift.with_reg_count()
|
Shift.with_reg_count()
|
||||||
.filter(
|
.filter(
|
||||||
help_wanted,
|
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(),
|
start_at__gt=timezone.now(),
|
||||||
deleted=False,
|
deleted=False,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue