summaryrefslogtreecommitdiff
path: root/django/template
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:25:21 +0100
commit5509eb862668ebeadd52248e2af124dfce2cce72 (patch)
tree06228ad47bf6f488e8cdfe67423d5734ba88beb4 /django/template
parent4467d86b61e47f4c9dcb130865a6700736500b4a (diff)
[1.5.x] Fixed #19370 -- Made date filter properly handle midnight value
Backport of c10aaa70a from master.
Diffstat (limited to 'django/template')
-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