Django 2.2.
[koed-quiz.git] / apps / quiz / templatetags / quiz_tags.py
index 2790ae2..2f9c12d 100755 (executable)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
 # This file is part of KOED-Quiz, licensed under GNU Affero GPLv3 or later.
 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
 #
@@ -9,6 +8,6 @@ from quiz.models import Quiz
 register = template.Library()
 
 
-@register.simple_tag
-def quiz_footer():
-    return mark_safe(Quiz.current().footer)
+@register.simple_tag(takes_context=True)
+def quiz_footer(context):
+    return mark_safe(context.get('request').current_quiz.footer)