]> git.openstreetmap.org Git - osqa.git/commitdiff
An extra filter that may be usefull for some modules.
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 31 Aug 2010 21:40:06 +0000 (21:40 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 31 Aug 2010 21:40:06 +0000 (21:40 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@578 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/templatetags/extra_filters.py

index 6f3679ce94089db875e0279bcbe89531571ca684..d9ae1933ae07df5862211355d1ebe48e72f67521 100644 (file)
@@ -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):