Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ESSArch_Core/config/local_settings.default
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import os

from ESSArch_Core.config.settings import (
AUTHENTICATION_BACKENDS,
CONFIG_DIR,
ESSARCH_DIR,
INSTALLED_APPS,
LOGGING_DIR,
MIDDLEWARE,
env,
)

Expand Down
18 changes: 13 additions & 5 deletions ESSArch_Core/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@

IS_MSSQL = default_db_config.get('ENGINE') == 'mssql'

# Database
DATABASES = {'default': default_db_config}
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

# Exclude file formats keys from content indexing. Example: ['fmt/569',]
EXCLUDE_FILE_FORMAT_FROM_INDEXING_CONTENT = env.list('ESSARCH_EXCLUDE_FILE_FORMAT_FROM_INDEXING_CONTENT', default=[])

Expand Down Expand Up @@ -198,11 +202,6 @@
])
MIDDLEWARE.extend(env.list('ESSARCH_MIDDLEWARE_EXTRA', default=[]))

# Database
DATABASES = {'default': default_db_config}

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

try:
import test_without_migrations # noqa
except ImportError:
Expand Down Expand Up @@ -633,6 +632,15 @@

try:
from local_essarch_settings import * # noqa isort:skip
INSTALLED_APPS.extend(locals().get('LOCAL_INSTALLED_APPS', []))
AUTHENTICATION_BACKENDS.extend(
locals().get('LOCAL_AUTHENTICATION_BACKENDS', [])
)
# AUTHENTICATION_BACKENDS = (
# locals().get('LOCAL_AUTHENTICATION_BACKENDS', [])
# + AUTHENTICATION_BACKENDS
# )
MIDDLEWARE.extend(locals().get('LOCAL_MIDDLEWARE', []))
except ImportError as e:
if e.name == 'local_essarch_settings':
raise ImportError('No settings file found, create one by running `essarch settings generate`')
Expand Down
Loading