dont' import everything from global_settings (#24081)

This commit is contained in:
Emmanuel Cazenave 2018-06-06 16:45:50 +02:00
parent 88ae29f099
commit 96d6282d56
2 changed files with 9 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import logging
import logging.config
# Load default from Django
from django.conf.global_settings import *
from django.conf import global_settings
import os
import django
@ -9,6 +9,9 @@ import django
from gadjo.templatetags.gadjo import xstatic
from . import plugins, logger
# debian/debian_config.py::extract_settings_from_environ expects CACHES to be in its NAMESPACE
CACHES = global_settings.CACHES
BASE_DIR = os.path.dirname(__file__)
### Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/
@ -90,7 +93,7 @@ TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'templates'),)
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),)
STATICFILES_FINDERS = STATICFILES_FINDERS + ('gadjo.finders.XStaticFinder',)
STATICFILES_FINDERS = list(global_settings.STATICFILES_FINDERS) + ['gadjo.finders.XStaticFinder']
LOCALE_PATHS = ( os.path.join(BASE_DIR, 'locale'), )
@ -178,14 +181,14 @@ IDP_BACKENDS = plugins.register_plugins_idp_backends(())
# Only https URLS are accepted.
# Can be none, sp, idp or both
PASSWORD_HASHERS += (
PASSWORD_HASHERS = list(global_settings.PASSWORD_HASHERS) + [
'authentic2.hashers.Drupal7PasswordHasher',
'authentic2.hashers.SHA256PasswordHasher',
'authentic2.hashers.SSHA1PasswordHasher',
'authentic2.hashers.SMD5PasswordHasher',
'authentic2.hashers.SHA1OLDAPPasswordHasher',
'authentic2.hashers.MD5OLDAPPasswordHasher',
)
'authentic2.hashers.MD5OLDAPPasswordHasher'
]
# Admin tools
ADMIN_TOOLS_INDEX_DASHBOARD = 'authentic2.dashboard.CustomIndexDashboard'

View File

@ -4,7 +4,7 @@ import os
if 'PASSWORD_HASHERS' not in locals():
from django.conf.global_settings import PASSWORD_HASHERS
PASSWORD_HASHERS = ('django.contrib.auth.hashers.UnsaltedMD5PasswordHasher',) + PASSWORD_HASHERS
PASSWORD_HASHERS = ['django.contrib.auth.hashers.UnsaltedMD5PasswordHasher'] + list(PASSWORD_HASHERS)
A2_CACHE_ENABLED = False