# This file is source/executed by /usr/lib/python*/site-packages/orthos2/settings.py
#
# Add your overrides here:
#
STATIC_ROOT = '/srv/www/orthos2/static'

SERVER_FQDN = 'orthos.domain.tld'
BASE_URL = 'https://orthos.domain.tld'
CONTACT = 'tbd@domain.tld'
SUPPORT_CONTACT = 'tbd@domain.tld'

#####################################################################
# LDAP authentication

# This must be set False in case of ldap authentication
# User creation can only be done via:
# orthos-admin createsuperuser
#AUTH_ALLOW_USER_CREATION = False

#AUTH_LDAP_SERVER_URI = os.environ.get('LDAP_HOST', default="")

#AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,cn=users,dc=suse,dc=de"
#AUTH_LDAP_USER_ATTR_MAP = {
#    'username': 'uid',
#    'email': 'mail',
#}
#AUTH_LDAP_ALWAYS_UPDATE_USER = True
#AUTH_LDAP_CACHE_TIMEOUT = 3600

# This is important, otherwise django will try to re-bing as anonymous user
# to fetch specific ldap info. It should be default imo, but it's not:
#AUTH_LDAP_BIND_AS_AUTHENTICATING_USER = True

#AUTHENTICATION_BACKENDS = (
#    'django_auth_ldap.backend.LDAPBackend',
#    'django.contrib.auth.backends.ModelBackend',
#)
#####################################################################

# Logging
LOGGING["handlers"]["file"] = {
    "level": "DEBUG",
    "class": "logging.FileHandler",
    "formatter": "syslog",
    "filename": "/var/log/orthos2/default.log",
}
DEFAULT_LOG.append("file")
