Refactor the initial setting bootstrap code
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -1,33 +1,28 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from mayan.apps.smart_settings.utils import get_environment_setting
|
||||
|
||||
from . import * # NOQA
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
DEBUG = True
|
||||
|
||||
CELERY_TASK_ALWAYS_EAGER = get_environment_setting(
|
||||
name='CELERY_TASK_ALWAYS_EAGER', fallback_default='true'
|
||||
)
|
||||
CELERY_TASK_EAGER_PROPAGATES = CELERY_TASK_ALWAYS_EAGER
|
||||
CELERY_TASK_EAGER_PROPAGATES = CELERY_TASK_ALWAYS_EAGER # NOQA: F405
|
||||
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
|
||||
if 'rosetta' not in INSTALLED_APPS:
|
||||
if 'rosetta' not in INSTALLED_APPS: # NOQA: F405
|
||||
try:
|
||||
import rosetta
|
||||
import rosetta # NOQA: F401
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
INSTALLED_APPS += (
|
||||
INSTALLED_APPS += ( # NOQA: F405
|
||||
'rosetta',
|
||||
)
|
||||
|
||||
if 'django_extensions' not in INSTALLED_APPS:
|
||||
try:
|
||||
import django_extensions
|
||||
import django_extensions # NOQA: F401
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
@@ -37,7 +32,7 @@ if 'django_extensions' not in INSTALLED_APPS:
|
||||
|
||||
ROOT_URLCONF = 'mayan.urls.development'
|
||||
|
||||
TEMPLATES[0]['OPTIONS']['loaders'] = (
|
||||
TEMPLATES[0]['OPTIONS']['loaders'] = ( # NOQA: F405
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user