From 50fbe8932e4003847fe4c4ed0c188f231d3f6a25 Mon Sep 17 00:00:00 2001 From: hernani Date: Tue, 31 Aug 2010 21:40:06 +0000 Subject: [PATCH] An extra filter that may be usefull for some modules. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@578 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/templatetags/extra_filters.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/forum/templatetags/extra_filters.py b/forum/templatetags/extra_filters.py index 6f3679c..d9ae193 100644 --- a/forum/templatetags/extra_filters.py +++ b/forum/templatetags/extra_filters.py @@ -34,6 +34,10 @@ def or_preview(setting, request): return setting.value +@register.filter +def getval(map, key): + return map.get(key, None) + @register.filter def contained_in(item, container): -- 2.39.5