Ejemplo n.º 1
0
        'mail_admins': {
            'level': 'ERROR',
            'filters': ['require_debug_false'],
            'class': 'django.utils.log.AdminEmailHandler'
        }
    },
    'loggers': {
        'django.request': {
            'handlers': ['mail_admins'],
            'level': 'ERROR',
            'propagate': True,
        },
    }
}

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

# Instances should create a local_settings.py to define custom settings.
try:
    from local_settings import *
    # Only set the Site model if local_settings exists. Otherwise assume this
    # is a Travis CI build and that the domain doesn't matter.
    from site_utils import set_site_info
    set_site_info(domain=DATAHUB_DOMAIN)
except ImportError:
    from default_settings import *
except OperationalError:
    # DB access fails during docker build. Ignore that here so the
    # collectstatic call will succeed.
    pass
Ejemplo n.º 2
0
        'mail_admins': {
            'level': 'ERROR',
            'filters': ['require_debug_false'],
            'class': 'django.utils.log.AdminEmailHandler'
        }
    },
    'loggers': {
        'django.request': {
            'handlers': ['mail_admins'],
            'level': 'ERROR',
            'propagate': True,
        },
    }
}

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

# Instances should create a local_settings.py to define custom settings.
try:
    from local_settings import *
    # Only set the Site model if local_settings exists. Otherwise assume this
    # is a Travis CI build and that the domain doesn't matter.
    from site_utils import set_site_info
    set_site_info(domain=DATAHUB_DOMAIN)
except ImportError:
    from default_settings import *
except OperationalError:
    # DB access fails during docker build. Ignore that here so the
    # collectstatic call will succeed.
    pass