Exemplo n.º 1
0
# https://docs.djangoproject.com/en/1.11/ref/settings/#csrf-cookie-path
# Ensure that our CSRF cookie does not collide with other CSRF cookies
# set by other Django apps served from the same domain.
CSRF_COOKIE_PATH = path_prefix
CSRF_COOKIE_NAME = "kolibri_csrftoken"

# https://docs.djangoproject.com/en/1.11/ref/settings/#session-cookie-path
# Ensure that our session cookie does not collidge with other session cookies
# set by other Django apps served from the same domain.
SESSION_COOKIE_PATH = path_prefix

# https://docs.djangoproject.com/en/1.9/ref/settings/#std:setting-LOGGING
# https://docs.djangoproject.com/en/1.9/topics/logging/

LOGGING = get_logging_config(conf.LOG_ROOT)


# Customizing Django auth system
# https://docs.djangoproject.com/en/1.9/topics/auth/customizing/

AUTH_USER_MODEL = "kolibriauth.FacilityUser"

# Our own custom setting to override the anonymous user model

AUTH_ANONYMOUS_USER_MODEL = "kolibriauth.KolibriAnonymousUser"

AUTHENTICATION_BACKENDS = ["kolibri.core.auth.backends.FacilityUserBackend"]


# Django REST Framework
Exemplo n.º 2
0
# Ensure that our CSRF cookie does not collide with other CSRF cookies
# set by other Django apps served from the same domain.
CSRF_COOKIE_PATH = path_prefix
CSRF_COOKIE_NAME = "kolibri_csrftoken"

# https://docs.djangoproject.com/en/1.11/ref/settings/#session-cookie-path
# Ensure that our session cookie does not collidge with other session cookies
# set by other Django apps served from the same domain.
SESSION_COOKIE_PATH = path_prefix

# https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-LOGGING
# https://docs.djangoproject.com/en/1.11/topics/logging/

LOGGING = get_logging_config(
    conf.LOG_ROOT,
    debug=DEBUG,
    debug_database=conf.OPTIONS["Server"]["DEBUG_LOG_DATABASE"],
)

# Customizing Django auth system
# https://docs.djangoproject.com/en/1.11/topics/auth/customizing/

AUTH_USER_MODEL = "kolibriauth.FacilityUser"

# Our own custom setting to override the anonymous user model

AUTH_ANONYMOUS_USER_MODEL = "kolibriauth.KolibriAnonymousUser"

AUTHENTICATION_BACKENDS = ["kolibri.core.auth.backends.FacilityUserBackend"]

# Django REST Framework