aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
authorAlban Gruin2017-09-12 21:42:52 +0200
committerAlban Gruin2017-09-12 21:42:52 +0200
commit5490a366c2acba45cc617a825904ba95eeb6b374 (patch)
tree315cfecea08bcf3cb671ddf28ef7b000016a04b7 /views.py
parent5a391f46fafee98b653f9c64219ad17844f7e340 (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]})