diff --git a/exam/templatetags/__init__.py b/exam/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/exam/templatetags/__init__.py diff --git a/exam/templatetags/dict_access.py b/exam/templatetags/dict_access.py new file mode 100644 index 0000000..bb671a6 --- /dev/null +++ b/exam/templatetags/dict_access.py @@ -0,0 +1,13 @@ +from django import template + +from forum.models import Forum + +register = template.Library() + +""" + Template tag to load all the foruns of a post +""" + +@register.filter +def value(dictionary, key): + return dictionary[key] -- libgit2 0.21.2