summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorDanilo Bargen <gezuru@gmail.com>2012-11-27 21:22:18 +0100
committerClaude Paroz <claude@2xlibre.net>2012-11-27 21:24:16 +0100
commitc10aaa70a4cc2e567dc29953f33f0a4219717d61 (patch)
tree5bd0d438d3dc3e8a4bf28db07007c10a1fdd9233 /django
parentd37483c533868e78afd0ca3faf993fee97097f9f (diff)
Fixed #19370 -- Made date filter properly handle midnight value
Diffstat (limited to 'django')
-rw-r--r--django/template/defaultfilters.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py
index e15440f90e..dac4e5ddb4 100644
--- a/django/template/defaultfilters.py
+++ b/django/template/defaultfilters.py
@@ -704,7 +704,7 @@ def get_digit(value, arg):
@register.filter(expects_localtime=True, is_safe=False)
def date(value, arg=None):
"""Formats a date according to the given format."""
- if not value:
+ if value in (None, ''):
return ''
if arg is None:
arg = settings.DATE_FORMAT