From 5937a601efb0447ef6b750efcbad463bd473abcb Mon Sep 17 00:00:00 2001 From: Emilie Date: Fri, 3 Nov 2017 11:14:49 +0100 Subject: [PATCH] [Locale] : add path + update mezzanine-organization --- app/settings.py | 60 +++++++++++++++++++++----------------- lib/mezzanine-organization | 2 +- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/app/settings.py b/app/settings.py index a3d29470..bddea86a 100644 --- a/app/settings.py +++ b/app/settings.py @@ -133,18 +133,6 @@ TIME_ZONE = 'Europe/Paris' # If you set this to True, Django will use timezone-aware datetimes. USE_TZ = True -# Language code for this installation. All choices can be found here: -# http://www.i18nguy.com/unicode/language-identifiers.html -LANGUAGE_CODE = "en" - -# Supported languages -LANGUAGES = ( - ('en', _('English')), - ('fr', _('French')), -) - -# LOCALE_PATHS = ['locale',] - # Whether a user's session cookie expires when the Web browser is closed. SESSION_EXPIRE_AT_BROWSER_CLOSE = False SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies" @@ -159,21 +147,6 @@ USE_L10N = True AUTHENTICATION_BACKENDS = ("mezzanine.core.auth_backends.MezzanineBackend", "guardian.backends.ObjectPermissionBackend",) -############# -# DATABASES # -############# - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'postgres', - 'USER': 'postgres', - 'PASSWORD': os.environ.get('DB_ENV_POSTGRES_PASSWORD'), - 'HOST': 'db', - 'PORT': '5432', - }, -} - ######### # PATHS # ######### @@ -212,6 +185,39 @@ MEDIA_ROOT = '/srv/media/' # Package/module name to import the root urlpatterns from for the project. ROOT_URLCONF = "urls" +######### +# LOCALE # +######### + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = "en" + +# Supported languages +LANGUAGES = ( + ('en', _('English')), + ('fr', _('French')), +) + +LOCALE_PATHS = ( + os.path.join(PROJECT_ROOT, 'lib/mezzanine-organization/organization/locale'), +) + +############# +# DATABASES # +############# + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'postgres', + 'USER': 'postgres', + 'PASSWORD': os.environ.get('DB_ENV_POSTGRES_PASSWORD'), + 'HOST': 'db', + 'PORT': '5432', + }, +} + ################ # APPLICATIONS # diff --git a/lib/mezzanine-organization b/lib/mezzanine-organization index 33077117..2e262b43 160000 --- a/lib/mezzanine-organization +++ b/lib/mezzanine-organization @@ -1 +1 @@ -Subproject commit 33077117f18a76fa037a24f7fa1382428052e255 +Subproject commit 2e262b435384f2d266ca3faf1a34a19e99ee2195 -- 2.39.5