diff options
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -1,18 +1,12 @@ from django.http import HttpResponse from django.db.models import Count from django.shortcuts import get_object_or_404, render, render_to_response -from django.utils import timezone from edt.models import Timetable, Group, Course +from edt.utils import get_week import datetime -def get_week(year, week): - start = timezone.make_aware(datetime.datetime.strptime("{0}-W{1:02d}-1".format(year, week), "%Y-W%W-%w")) - end = start + datetime.timedelta(weeks=1) - - return start, end - def index(request): timetables = Timetable.objects.all() groups = Group.objects.filter(tp__isnull=False).order_by("name") |