From ce571c156be685c11f907d8a92749073b54a261b Mon Sep 17 00:00:00 2001 From: Thomas Vignos Date: Wed, 27 Mar 2024 18:29:09 -0400 Subject: [PATCH] Add prints for by day --- src/eatery/serializers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/eatery/serializers.py b/src/eatery/serializers.py index 25883a1..dbe4c0d 100644 --- a/src/eatery/serializers.py +++ b/src/eatery/serializers.py @@ -57,6 +57,10 @@ def get_events(self, obj): day = now.replace(hour=0, minute=0, second=0, microsecond=0) + timedelta(days=day_offset) day_unix = int(day.timestamp()) day_end_unix = int((day + timedelta(days=1)).timestamp()) + print(f"Now: {now}") + print(f"Day: {day}") + print(f"Day Unix: {day_unix}") + print(f"Day End Unix: {day_end_unix}") events = Event.objects.filter(eatery=obj.id, start__gte=day_unix, start__lt=day_end_unix) serializer = EventSerializerOptimized(instance=events, many=True) return serializer.data