summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templatetags
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2012-10-04 12:02:52 +0200
committerAurélien Bompard <aurelien@bompard.org>2012-10-04 12:02:52 +0200
commitcd1a2d5f2ec738ab2f17c86dcabe8733a682aa4f (patch)
treea00aafaafbe919364ff8c9882bc5cf26935fb29a /hyperkitty/templatetags
parent5f9c7c8bba6db94f45cf0d0f2ca679ee8a0a3a92 (diff)
downloadhyperkitty-cd1a2d5f2ec738ab2f17c86dcabe8733a682aa4f.tar.gz
hyperkitty-cd1a2d5f2ec738ab2f17c86dcabe8733a682aa4f.tar.xz
hyperkitty-cd1a2d5f2ec738ab2f17c86dcabe8733a682aa4f.zip
Improve attachments display
Diffstat (limited to 'hyperkitty/templatetags')
-rw-r--r--hyperkitty/templatetags/poll_extras.py2
-rw-r--r--hyperkitty/templatetags/storm.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/hyperkitty/templatetags/poll_extras.py b/hyperkitty/templatetags/poll_extras.py
index a5f1032..0f243c6 100644
--- a/hyperkitty/templatetags/poll_extras.py
+++ b/hyperkitty/templatetags/poll_extras.py
@@ -43,7 +43,7 @@ def strip_page(value):
return value
if value.endswith('/') and value[-3] == '/':
end_with_number = False
- try:
+ try:
if int(value[-2]) in range(0,10):
end_with_number = True
if end_with_number:
diff --git a/hyperkitty/templatetags/storm.py b/hyperkitty/templatetags/storm.py
new file mode 100644
index 0000000..81fd4aa
--- /dev/null
+++ b/hyperkitty/templatetags/storm.py
@@ -0,0 +1,7 @@
+from django import template
+
+register = template.Library()
+
+@register.filter(name="count")
+def count(expr):
+ return expr.count()