]> git.parisson.com Git - mezzo.git/commitdiff
Add a little more default settings
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 18 Sep 2018 13:14:20 +0000 (15:14 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 18 Sep 2018 13:14:20 +0000 (15:14 +0200)
.gitmodules
app/bin/app.sh
app/settings.py
bin
lib/grappelli-safe
lib/mezzanine
lib/mezzanine-agenda
lib/mezzanine-organization
lib/mezzanine-organization-themes

index e7f2b3a23ec84cdec0cf63ad89f8c974d3dde35d..53cf1ea186257f366e734e2df4599eb697a3342d 100644 (file)
@@ -31,7 +31,7 @@
     path = lib/mezzanine-organization
     url = git@github.com:Ircam-Web/mezzanine-organization.git
     branch-master = master
-    branch-dev = test
+    branch-dev = dev
     ignore = dirty
 [submodule "lib/cartridge"]
     path = lib/cartridge
index b37b7e81eb5a6b8a496dd295f5570340f8133728..0390cef093cdc4469ca915fed1a6d00ea62388f5 100755 (executable)
@@ -25,7 +25,7 @@ gid='www-data'
 # pip install -e /srv/lib/mypackage...
 
 # Install (staging) libs
-/srv/bin/build/local/setup_lib.sh
+/srv/bin/build/local/setup_lib.sh
 
 # waiting for other services
 sh $app/bin/wait.sh
index ed22ba61e908abc91917c5e857f2df5e61b9a852..d7b961560c021fb75426f0518f97b3a468f0142b 100644 (file)
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (c) 2016-2017 Ircam
-# Copyright (c) 2016-2017 Guillaume Pellerin
-# Copyright (c) 2016-2017 Emilie Zawadzki
+# Copyright (c) 2016-2018 Ircam
+# Copyright (c) 2016-2018 Guillaume Pellerin
+# Copyright (c) 2016-2018 Emilie Zawadzki
 
 # This file is part of mezzanine-organization.
 
 # You should have received a copy of the GNU Affero General Public License
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
+
+from __future__ import absolute_import, unicode_literals
+
+import os
+from django.utils.translation import ugettext_lazy as _
+from django.core.urlresolvers import reverse_lazy
+import ldap, logging
+from django.core.urlresolvers import reverse_lazy
+from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
+
+DEBUG = True if os.environ.get('DEBUG') == 'True' else False
+
+import warnings
+warnings.filterwarnings(
+        'ignore', r"DateTimeField .* received a naive datetime",
+        RuntimeWarning, r'django\.db\.models\.fields')
+
+SILENCED_SYSTEM_CHECKS = ['fields.W342',]
+
+
 ###################################
 # MEZZANINE ORGANIZATION SETTINGS #
 ###################################
@@ -29,6 +49,112 @@ except ImportError as e:
         raise e
 
 
+########################
+# MAIN DJANGO SETTINGS #
+########################
+
+# Hosts/domain names that are valid for this site; required if DEBUG is False
+# See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
+ALLOWED_HOSTS = ['*']
+
+# Local time zone for this installation. Choices can be found here:
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
+# although not all choices may be available on all operating systems.
+# On Unix systems, a value of None will cause Django to use the same
+# timezone as the operating system.
+# If running in a Windows environment this must be set to the same as your
+# system time zone.
+TIME_ZONE = 'Europe/Paris'
+
+# If you set this to True, Django will use timezone-aware datetimes.
+USE_TZ = True
+
+# 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"
+
+SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
+USE_L10N = True
+
+AUTHENTICATION_BACKENDS = (
+    "organization.core.backend.OrganizationLDAPBackend",
+    "mezzanine.core.auth_backends.MezzanineBackend",
+    "guardian.backends.ObjectPermissionBackend",
+)
+
+
+##########
+# LOCALE #
+##########
+
+# Language code for this installation. All choices can be found here:
+# http://www.i18nguy.com/unicode/language-identifiers.html
+LANGUAGE_CODE = "fr"
+
+# Supported languages
+LANGUAGES = (
+    ('fr', _('French')),
+    ('en', _('English')),
+)
+
+#############
+# 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',
+    },
+}
+
+
+##########################################
+# CUSTOM MEZZANINE ORGANIZATION SETTINGSĀ #
+##########################################
+
+# List of middleware classes to use. Order is important; in the request phase,
+# these middleware classes will be applied in the order given, and in the
+# response phase the middleware will be applied in reverse order.
+MIDDLEWARE_CLASSES += ()
+
+STATICFILES_FINDERS += ()
+
+SEARCH_MODEL_CHOICES += ()
+
+PAGES_MODELS += ()
+
+
+################
+# APPLICATIONS #
+################
+
+INSTALLED_APPS += []
+
+CUSTOM_MODULES = False
+
+if CUSTOM_MODULES:
+    INSTALLED_APPS += [
+        "organization.custom",
+    ]
+
+##########
+# THEMES #
+##########
+
+HOST_THEMES = [
+    ('example.com', 'organization_themes.ircam-www-theme'),
+]
+
+
 ##################
 # LOCAL SETTINGS #
 ##################
@@ -42,18 +168,6 @@ except ImportError as e:
     if "local_settings" not in str(e):
         raise e
 
-# Please define THEME_APP in local_settings
-INSTALLED_APPS.insert(1, 'organization_themes.ircam-www-theme')
-
-
-# Themes
-HOST_THEMES = [
-    ('example.com', 'organization_themes.ircam-www-theme'),
-]
-
-# Locales
-LOCALE_PATHS += (os.path.join(PROJECT_ROOT, 'lib/mezzanine-organization-themes/organization_themes/ircam-www-theme/locale/'),)
-
 ####################
 # DYNAMIC SETTINGS #
 ####################
diff --git a/bin b/bin
index 531645508807efca744dc4f6b5f2a28ec7ab8b5b..e8e0c2897f07c70f4723b359d2957faeff335ef4 160000 (submodule)
--- a/bin
+++ b/bin
@@ -1 +1 @@
-Subproject commit 531645508807efca744dc4f6b5f2a28ec7ab8b5b
+Subproject commit e8e0c2897f07c70f4723b359d2957faeff335ef4
index 1ea336a5e767fdbaca08811f859e8a0d93e01023..66109d3f698d57c981bcd35764bfdea8b50d6dc2 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 1ea336a5e767fdbaca08811f859e8a0d93e01023
+Subproject commit 66109d3f698d57c981bcd35764bfdea8b50d6dc2
index 1ec7ffd5e26064a284eaeafb26ec45e383e3157c..c6a7b6bcecc529b01fcbc6b91798b79219e2dff7 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 1ec7ffd5e26064a284eaeafb26ec45e383e3157c
+Subproject commit c6a7b6bcecc529b01fcbc6b91798b79219e2dff7
index 198696f9bebdf3f0b7090de0a1aab8299470b58e..e915a18d2c8d156060a7416a6be51eb62f0d50f8 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 198696f9bebdf3f0b7090de0a1aab8299470b58e
+Subproject commit e915a18d2c8d156060a7416a6be51eb62f0d50f8
index 8fb389dbb96a18761cfb535208d3770a70a1e028..a6f47e1df615f258f333c13b3c5ae0d06a05e2da 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 8fb389dbb96a18761cfb535208d3770a70a1e028
+Subproject commit a6f47e1df615f258f333c13b3c5ae0d06a05e2da
index b549942259c15cfa1f7fe8bad1a995ce6837ef0c..3b0f1da45922e476c65749e8590bca054f470277 160000 (submodule)
@@ -1 +1 @@
-Subproject commit b549942259c15cfa1f7fe8bad1a995ce6837ef0c
+Subproject commit 3b0f1da45922e476c65749e8590bca054f470277