diff options
author | Alban Gruin | 2017-09-04 22:13:31 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-04 22:13:31 +0200 |
commit | ab9df7a174e2debbf9c644c8ec3e2127eeeaa3cf (patch) | |
tree | bf9510823644aa1c5dba0ab39277633c0f18ad49 /views.py | |
parent | ce0ed9347adde9ca80c11efe79766c966d5749ba (diff) | |
parent | 4b3fc9e4c41e2247bf0fa0fe2629b2b57fc174b0 (diff) |
Merge branch 'stable/0.y.z' into prod/pa1ch/0.y.zv0.8.0-pa1chprod/pa1ch/0.8.z
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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: |