예제 #1
0
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')})
예제 #2
0
파일: views.py 프로젝트: Ibb41-4/dormsite
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")}
    )
예제 #3
0
파일: views.py 프로젝트: Ibb41-4/dormsite
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")}
    )
예제 #4
0
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')})