diff options
author | Alban Gruin | 2017-10-31 13:10:18 +0100 |
---|---|---|
committer | Alban Gruin | 2017-10-31 13:10:18 +0100 |
commit | 3f610831227e7def4b74651747d5625c9a009311 (patch) | |
tree | 55b5deea6f47e6e165aae6580ee0c7ac32a182ec /views.py | |
parent | 55ad46fe32ce8122d884dda4eb498e20e39622ad (diff) |
Création d’une flatpage spécifique à la page « à propos »
Ajout d’un processeur de contexte pour afficher la version de CS en bas de page.
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -23,6 +23,8 @@ from django.shortcuts import get_object_or_404, render from .models import Timetable, Group, Course, Year from .utils import get_current_week, get_current_or_next_week, get_week, group_courses +import edt + def index(request): years = Year.objects.order_by("name") return render(request, "index.html", {"elements": years}) @@ -102,3 +104,6 @@ def calendars(request, year_slug, timetable_slug, group_slug): .order_by("length") return render(request, "calendars.html", {"group": group, "groups": groups}) + +def ctx_processor(request): + return {"celcatsanitizer_version": edt.VERSION} |