]> git.parisson.com Git - django-postman.git/commitdiff
added expects_localtime to the compact_date template filter in the case of Django...
authorJoe Boutros <jboutros@gmail.com>
Tue, 10 Apr 2012 06:39:10 +0000 (01:39 -0500)
committerJoe Boutros <jboutros@gmail.com>
Tue, 10 Apr 2012 06:39:10 +0000 (01:39 -0500)
postman/templatetags/postman_tags.py

index 7c420dcf00093cfc4796acc770b17e5a86c9f995..be358e4989088e9d14d31d844dbf22ea0183a7b9 100644 (file)
@@ -38,7 +38,13 @@ def or_me(value, arg):
         arg = unicode(arg)
     return _('<me>') if value == arg else value
 
-@register.filter
+import django
+if django.VERSION >= (1, 4):
+    date_filter_params = {'expects_localtime':True}
+else:
+    date_filter_params = {}
+
+@register.filter(**date_filter_params)
 def compact_date(value, arg):
     """
     Output a date as short as possible.