mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.9.x] Fixed #25812 -- Restored the ability to use custom formats with the date template filter.
Backport of 34d88944f4 from master
This commit is contained in:
@@ -1248,6 +1248,11 @@ class FormattingTests(SimpleTestCase):
|
||||
def test_format_arbitrary_settings(self):
|
||||
self.assertEqual(get_format('DEBUG'), 'DEBUG')
|
||||
|
||||
def test_get_custom_format(self):
|
||||
with self.settings(FORMAT_MODULE_PATH='i18n.other.locale'):
|
||||
with translation.override('fr', deactivate=True):
|
||||
self.assertEqual('d/m/Y CUSTOM', get_format('CUSTOM_DAY_FORMAT'))
|
||||
|
||||
|
||||
class MiscTests(SimpleTestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user