|
@@ -1,5 +1,5 @@
|
|
from coffin.template import Library
|
|
from coffin.template import Library
|
|
-from misago.utils.datesformats import date, reldate, reltimesince
|
|
|
|
|
|
+from misago.utils.datesformats import date, reldate, reltimesince, compact, relcompact
|
|
|
|
|
|
register = Library()
|
|
register = Library()
|
|
|
|
|
|
@@ -17,3 +17,13 @@ def reldate_filter(val, arg=""):
|
|
@register.filter(name='reltimesince')
|
|
@register.filter(name='reltimesince')
|
|
def reltimesince_filter(val, arg=""):
|
|
def reltimesince_filter(val, arg=""):
|
|
return reltimesince(val, arg)
|
|
return reltimesince(val, arg)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+@register.filter(name='compact')
|
|
|
|
+def compact_filter(val, arg=""):
|
|
|
|
+ return compact(val, arg)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+@register.filter(name='relcompact')
|
|
|
|
+def relcompact_filter(val, arg=""):
|
|
|
|
+ return relcompact(val, arg)
|