def schedule(request): start_week = Week.get_current_week().previous_week(7) weeks = start_week.get_weeks(42) weeks = weeks[:35] # don't show the last 7, this way we generate them but don't show them. # This helps preventing that switching changes the overall structure for week in weeks: assign_weeks(week) return render(request, 'schedule/schedule.html', {'data': weeks, 'tasks': Task.objects.all().order_by('description')})
def schedule(request): start_week = Week.get_current_week().previous_week(7) weeks = start_week.get_weeks(42) weeks = weeks[:35] # don't show the last 7, this way we generate them but don't show them. # This helps preventing that switching changes the overall structure for week in weeks: assign_weeks(week) return render( request, "schedule/schedule.html", {"data": weeks, "tasks": Task.objects.all().order_by("description")} )
def print_schedule(request): current_week = Week.get_current_week() weeks = current_week.get_weeks(21) return render( request, "schedule/print_schedule.html", {"data": weeks, "tasks": Task.objects.all().order_by("description")} )
def print_schedule(request): current_week = Week.get_current_week() weeks = current_week.get_weeks(21) return render(request, 'schedule/print_schedule.html', {'data': weeks, 'tasks': Task.objects.all().order_by('description')})