|
|
@ -23,10 +23,11 @@ from unipath import Path |
|
|
from .temp_suppress_crispy_form_warnings import \ |
|
|
from .temp_suppress_crispy_form_warnings import \ |
|
|
SUPRESS_CRISPY_FORM_WARNINGS_LOGGING |
|
|
SUPRESS_CRISPY_FORM_WARNINGS_LOGGING |
|
|
|
|
|
|
|
|
|
|
|
HOST = None |
|
|
|
|
|
|
|
|
BASE_DIR = Path(__file__).ancestor(1) |
|
|
BASE_DIR = Path(__file__).ancestor(1) |
|
|
PROJECT_DIR = Path(__file__).ancestor(2) |
|
|
PROJECT_DIR = Path(__file__).ancestor(2) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret! |
|
|
# SECURITY WARNING: keep the secret key used in production secret! |
|
|
SECRET_KEY = config('SECRET_KEY', default='') |
|
|
SECRET_KEY = config('SECRET_KEY', default='') |
|
|
# SECURITY WARNING: don't run with debug turned on in production! |
|
|
# SECURITY WARNING: don't run with debug turned on in production! |
|
|
@ -74,6 +75,7 @@ INSTALLED_APPS = ( |
|
|
'django.contrib.sessions', |
|
|
'django.contrib.sessions', |
|
|
'django.contrib.messages', |
|
|
'django.contrib.messages', |
|
|
'django.contrib.staticfiles', |
|
|
'django.contrib.staticfiles', |
|
|
|
|
|
'django.contrib.sites', |
|
|
|
|
|
|
|
|
# more |
|
|
# more |
|
|
'django_extensions', |
|
|
'django_extensions', |
|
|
@ -132,8 +134,13 @@ MIDDLEWARE_CLASSES = ( |
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
|
'django.middleware.security.SecurityMiddleware', |
|
|
'django.middleware.security.SecurityMiddleware', |
|
|
# 'speedinfo.middleware.ProfilerMiddleware', # Bug na versão 1.9 |
|
|
# 'speedinfo.middleware.ProfilerMiddleware', # Bug na versão 1.9 |
|
|
|
|
|
|
|
|
|
|
|
'sapl.middleware.SiteMiddleware', |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
DEFAULT_SITE_ID = 1 |
|
|
|
|
|
SITE_ID = 1 |
|
|
|
|
|
|
|
|
CACHES = { |
|
|
CACHES = { |
|
|
'default': { |
|
|
'default': { |
|
|
'BACKEND': 'speedinfo.backends.proxy_cache', |
|
|
'BACKEND': 'speedinfo.backends.proxy_cache', |
|
|
@ -297,7 +304,7 @@ LOGGING = { |
|
|
'disable_existing_loggers': False, |
|
|
'disable_existing_loggers': False, |
|
|
'formatters': { |
|
|
'formatters': { |
|
|
'verbose': { |
|
|
'verbose': { |
|
|
'format': '%(levelname)s %(asctime)s %(filename)s %(funcName)s %(lineno)d %(name)s %(message)s' |
|
|
'format': '%(levelname)s %(asctime)s ' + str(HOST) + ' %(filename)s %(funcName)s %(lineno)d %(name)s %(message)s' |
|
|
}, |
|
|
}, |
|
|
'simple': { |
|
|
'simple': { |
|
|
'format': '%(levelname)s %(asctime)s %(message)s' |
|
|
'format': '%(levelname)s %(asctime)s %(message)s' |
|
|
@ -307,7 +314,10 @@ LOGGING = { |
|
|
# TODO Ver depois ! |
|
|
# TODO Ver depois ! |
|
|
'require_debug_false': { |
|
|
'require_debug_false': { |
|
|
'()': 'django.utils.log.RequireDebugFalse' |
|
|
'()': 'django.utils.log.RequireDebugFalse' |
|
|
} |
|
|
}, |
|
|
|
|
|
'site_filter': { |
|
|
|
|
|
'()': 'sapl.logging_filters.SiteFilter', |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
'handlers': { |
|
|
'handlers': { |
|
|
'console': { |
|
|
'console': { |
|
|
|