aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'views.py')
-rw-r--r--views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/views.py b/views.py
index 9040c9e..28b069e 100644
--- a/views.py
+++ b/views.py
@@ -1,6 +1,6 @@
from django.http import HttpResponse, Http404
from django.db.models import Count
-from django.shortcuts import get_object_or_404, redirect, render, render_to_response
+from django.shortcuts import get_object_or_404, redirect, render
from django.utils import timezone
from edt.models import Timetable, LastUpdate, Group, Subscription, Course
@@ -22,7 +22,7 @@ def index(request):
weeks.append(date)
group.weeks = weeks
- return render_to_response("index.html", {"timetables": timetables, "groups": groups})
+ return render(request, "index.html", {"timetables": timetables, "groups": groups})
def timetable(request, timetable_slug, year, week, group_slug):
start, end = get_week(int(year), int(week))
@@ -40,7 +40,7 @@ def timetable(request, timetable_slug, year, week, group_slug):
else:
grouped_courses[-1].append(course)
- return render_to_response("timetable.html", {"timetable": timetable, "group": group, "courses": grouped_courses, "last_update": last_update.date, "year": year, "week": week})
+ return render(request, "timetable.html", {"timetable": timetable, "group": group, "courses": grouped_courses, "last_update": last_update.date, "year": year, "week": week})
def subscribe(request, timetable_slug, year, week, group_slug):
group = get_object_or_404(Group, slug=group_slug)