diff options
| author | Ramiro Morales <cramm0@gmail.com> | 2011-01-13 03:02:32 +0000 |
|---|---|---|
| committer | Ramiro Morales <cramm0@gmail.com> | 2011-01-13 03:02:32 +0000 |
| commit | fd12e3b2186e47653b25efccec28cee68bd20f7e (patch) | |
| tree | 462b795d478af2d2ac6539da5fed4d4eed7fd977 /django | |
| parent | 1c56af676d02aa0cdb70bb3749971f1cac4afdb3 (diff) | |
Fixed #15024 -- Ensure that choice of L10N format module used is stable given a stable setup of format modules in ll/ and ll_CC/ dirs. Thanks David Reynolds for the report and suggestions leading to the solution.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/utils/formats.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/utils/formats.py b/django/utils/formats.py index c23a37cb2b..1eb7a3d837 100644 --- a/django/utils/formats.py +++ b/django/utils/formats.py @@ -24,7 +24,9 @@ def iter_format_modules(lang): format_locations.append(settings.FORMAT_MODULE_PATH + '.%s') format_locations.reverse() locale = to_locale(lang) - locales = set((locale, locale.split('_')[0])) + locales = [locale] + if '_' in locale: + locales.append(locale.split('_')[0]) for location in format_locations: for loc in locales: try: |
