mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[4.1.x] Fixed #33748 -- Fixed date template filter crash with lazy format.
Regression in659d2421c7. Backport of292f372768from main
This commit is contained in:
committed by
Mariusz Felisiak
parent
0210dbcbe3
commit
000e8e0d38
@@ -1518,6 +1518,9 @@ class FormattingTests(SimpleTestCase):
|
||||
with translation.override("de", deactivate=True):
|
||||
self.assertEqual(".", get_format("DECIMAL_SEPARATOR", lang="en"))
|
||||
|
||||
def test_get_format_lazy_format(self):
|
||||
self.assertEqual(get_format(gettext_lazy("DATE_FORMAT")), "N j, Y")
|
||||
|
||||
def test_localize_templatetag_and_filter(self):
|
||||
"""
|
||||
Test the {% localize %} templatetag and the localize/unlocalize filters.
|
||||
|
||||
Reference in New Issue
Block a user