Skip to content
Snippets Groups Projects
Commit 66bbc1af authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Show menu pdf for next week already an saturdays and sundays (issue #232)

parent 256b85c3
No related branches found
No related tags found
No related merge requests found
import datetime import datetime
import os import os
import time
from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.decorators import login_required, permission_required
from django.http import FileResponse from django.http import FileResponse
...@@ -66,6 +67,9 @@ def show_current(request): ...@@ -66,6 +67,9 @@ def show_current(request):
if days_to_add < 0: if days_to_add < 0:
days_to_add = days_to_add + 7 days_to_add = days_to_add + 7
if days_to_add == 6 or days_to_add == 7:
calendar_week += 1
# Create datetime with next friday and time 14:10 # Create datetime with next friday and time 14:10
friday = current_date + datetime.timedelta(days=days_to_add) friday = current_date + datetime.timedelta(days=days_to_add)
friday_14_10 = timezone.datetime(friday.year, friday.month, friday.day, 14, 10) friday_14_10 = timezone.datetime(friday.year, friday.month, friday.day, 14, 10)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment