|
|
@ -22,13 +22,13 @@ from dj_database_url import parse as db_url |
|
|
|
from easy_thumbnails.conf import Settings as thumbnail_settings |
|
|
|
from unipath import Path |
|
|
|
|
|
|
|
logging.captureWarnings(True) |
|
|
|
|
|
|
|
host = socket.gethostbyname_ex(socket.gethostname())[0] |
|
|
|
|
|
|
|
BASE_DIR = Path(__file__).ancestor(1) |
|
|
|
PROJECT_DIR = Path(__file__).ancestor(2) |
|
|
|
|
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret! |
|
|
|
SECRET_KEY = config('SECRET_KEY', default='') |
|
|
|
# SECURITY WARNING: don't run with debug turned on in production! |
|
|
@ -48,7 +48,6 @@ if DEBUG: |
|
|
|
else: |
|
|
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' |
|
|
|
|
|
|
|
|
|
|
|
# SAPL business apps in dependency order |
|
|
|
SAPL_APPS = ( |
|
|
|
'sapl.audiencia', |
|
|
@ -185,7 +184,6 @@ CACHES = { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ROOT_URLCONF = 'sapl.urls' |
|
|
|
|
|
|
|
TEMPLATES = [ |
|
|
@ -212,7 +210,6 @@ TEMPLATES = [ |
|
|
|
}, |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
WSGI_APPLICATION = 'sapl.wsgi.application' |
|
|
|
|
|
|
|
# Database |
|
|
@ -294,7 +291,6 @@ if DEBUG and not WEBPACK_LOADER['DEFAULT']['STATS_FILE'].exists(): |
|
|
|
WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = PROJECT_DIR.child( |
|
|
|
'frontend').child(f'webpack-stats.json') |
|
|
|
|
|
|
|
|
|
|
|
STATIC_URL = '/static/' |
|
|
|
STATIC_ROOT = PROJECT_DIR.child("collected_static") |
|
|
|
|
|
|
@ -327,6 +323,7 @@ FILTERS_HELP_TEXT_FILTER = False |
|
|
|
LOGGING = { |
|
|
|
'version': 1, |
|
|
|
'disable_existing_loggers': False, |
|
|
|
|
|
|
|
'formatters': { |
|
|
|
'verbose': { |
|
|
|
'format': '%(levelname)s %(asctime)s ' + host + ' %(pathname)s %(name)s:%(funcName)s:%(lineno)d %(message)s' |
|
|
@ -369,15 +366,4 @@ PASSWORD_HASHERS = [ |
|
|
|
'sapl.hashers.ZopeSHA1PasswordHasher', |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
def remove_warnings(): |
|
|
|
import warnings |
|
|
|
warnings.filterwarnings( |
|
|
|
'ignore', module='floppyforms', |
|
|
|
message='Unable to import floppyforms.gis' |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
LOGOUT_REDIRECT_URL = '/login' |
|
|
|
|
|
|
|
remove_warnings() |
|
|
|