summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorNick Pope <nick@nickpope.me.uk>2022-10-12 13:23:04 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-04 11:47:14 +0100
commit0fdc5d79b6cfe7317fd6b19f4cdf2183f2d048d1 (patch)
treef9cc2996ae5a2693c0dbf4cc517b3093a881053e /django
parent5cf9ff970e08b10d3f7d62734dbce9e8eaeff453 (diff)
Simplified django.utils.formats.date_format()/time_format() calls.
This removes redundant get_format() calls and passing a default value for the format argument.
Diffstat (limited to 'django')
-rw-r--r--django/utils/formats.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/formats.py b/django/utils/formats.py
index b0a66e4e25..85d24b9443 100644
--- a/django/utils/formats.py
+++ b/django/utils/formats.py
@@ -217,7 +217,7 @@ def localize(value, use_l10n=None):
elif isinstance(value, datetime.date):
return date_format(value, use_l10n=use_l10n)
elif isinstance(value, datetime.time):
- return time_format(value, "TIME_FORMAT", use_l10n=use_l10n)
+ return time_format(value, use_l10n=use_l10n)
return value