mirror of
https://github.com/django/django.git
synced 2024-12-26 02:56:25 +00:00
Fixed #8491 -- Allow settings.LOCALE_PATH to be any sequence, not just a tuple.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8527 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d535edb9da
commit
05e8c3ecd3
@ -9,10 +9,10 @@ except NameError:
|
|||||||
from sets import Set as set # For Python 2.3
|
from sets import Set as set # For Python 2.3
|
||||||
|
|
||||||
def compile_messages(locale=None):
|
def compile_messages(locale=None):
|
||||||
basedirs = (os.path.join('conf', 'locale'), 'locale')
|
basedirs = [os.path.join('conf', 'locale'), 'locale']
|
||||||
if os.environ.get('DJANGO_SETTINGS_MODULE'):
|
if os.environ.get('DJANGO_SETTINGS_MODULE'):
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
basedirs += settings.LOCALE_PATHS
|
basedirs.extend(settings.LOCALE_PATHS)
|
||||||
|
|
||||||
# Gather existing directories.
|
# Gather existing directories.
|
||||||
basedirs = set(map(os.path.abspath, filter(os.path.isdir, basedirs)))
|
basedirs = set(map(os.path.abspath, filter(os.path.isdir, basedirs)))
|
||||||
|
Loading…
Reference in New Issue
Block a user