aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
authorAlban Gruin2017-09-10 12:26:40 +0200
committerAlban Gruin2017-09-10 12:26:40 +0200
commit6eef540f3de6b6b7a81b058f99950da40af00359 (patch)
tree3b52a00451d132af64ca3b9480f5dbad66eaf4f2 /views.py
parent965fb737b5ca4f258cc8f9ff1bd52ca1ce18a635 (diff)
Ajout d’une page contact. L’adresse email est brouillée.
Diffstat (limited to 'views.py')
-rw-r--r--views.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/views.py b/views.py
index f445725..302b375 100644
--- a/views.py
+++ b/views.py
@@ -13,6 +13,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with celcatsanitizer. If not, see <http://www.gnu.org/licenses/>.
+from django.conf import settings
from django.shortcuts import get_object_or_404, render
from .models import Timetable, LastUpdate, Group, Course, Year
@@ -65,3 +66,6 @@ def timetable(request, year_slug, timetable_slug, group_slug, year=None, week=No
grouped_courses = group_courses(courses)
return render(request, "timetable.html", {"group": group, "courses": grouped_courses, "last_update": last_update.date, "year": year, "week": int(week)})
+
+def contact(request):
+ return render(request, "contact.html", {"email": settings.ADMINS[0][1]})