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 22c08ac..176f174 100644
--- a/views.py
+++ b/views.py
@@ -24,8 +24,8 @@ from .models import Timetable, LastUpdate, Group, Subscription, Course
from .utils import get_current_week, get_week, group_courses
def index(request):
- timetables = Timetable.objects.all().order_by("name")
- groups = Group.objects.filter(tp__isnull=False).order_by("name")
+ timetables = Timetable.objects.order_by("name")
+ groups = Group.objects.get_relevant_groups().order_by("name")
year, week = get_current_week()
start, _ = get_week(year, week)
@@ -74,7 +74,7 @@ def subscribe(request, timetable_slug, group_slug, year, week):
template = loader.get_template("mail/mail_confirm.txt")
context = Context({"group": group, "admins": settings.ADMINS, "token": subscription.token, "domain": settings.DEFAULT_DOMAIN})
- send_mail("Confirmation de l'abonnemenent", template.render(context), settings.DEFAULT_FROM_EMAIL, [request.POST["email"]])
+ send_mail("Confirmation de l’abonnemenent", template.render(context), settings.DEFAULT_FROM_EMAIL, [request.POST["email"]])
return redirect("timetable", timetable_slug=timetable_slug, group_slug=group_slug, year=year, week=int(week))
else: