1
0
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:
Gagaro
2015-11-25 12:17:59 +01:00
committed by Tim Graham
parent b5ff75dab8
commit 08e1c79f7a
7 changed files with 19 additions and 6 deletions

View File

@@ -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):