2016-06-25 09:09:46 +00:00
|
|
|
"""
|
|
|
|
Django test settings for cas_server application.
|
|
|
|
|
|
|
|
Generated by 'django-admin startproject' using Django 1.9.7.
|
|
|
|
|
|
|
|
For more information on this file, see
|
|
|
|
https://docs.djangoproject.com/en/1.9/topics/settings/
|
|
|
|
|
|
|
|
For the full list of settings and their values, see
|
|
|
|
https://docs.djangoproject.com/en/1.9/ref/settings/
|
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
2016-08-25 11:02:09 +00:00
|
|
|
import django
|
2016-06-25 09:09:46 +00:00
|
|
|
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
|
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
|
|
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
|
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
|
|
SECRET_KEY = 'changeme'
|
|
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
|
DEBUG = True
|
|
|
|
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
|
|
|
|
|
|
|
# Application definition
|
|
|
|
|
|
|
|
INSTALLED_APPS = [
|
|
|
|
'django.contrib.admin',
|
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
|
|
|
'django.contrib.sessions',
|
|
|
|
'django.contrib.messages',
|
|
|
|
'django.contrib.staticfiles',
|
|
|
|
'cas_server',
|
|
|
|
]
|
|
|
|
|
2016-08-25 11:02:09 +00:00
|
|
|
MIDDLEWARE = [
|
2016-06-25 09:09:46 +00:00
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
|
'django.middleware.common.CommonMiddleware',
|
|
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
|
'django.middleware.locale.LocaleMiddleware',
|
|
|
|
]
|
2016-08-25 11:02:09 +00:00
|
|
|
if django.VERSION < (1, 10):
|
|
|
|
MIDDLEWARE_CLASSES = MIDDLEWARE
|
2016-06-25 09:09:46 +00:00
|
|
|
|
2016-07-29 11:56:23 +00:00
|
|
|
TEMPLATES = [
|
|
|
|
{
|
|
|
|
'APP_DIRS': True,
|
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
|
|
'DIRS': [],
|
|
|
|
'OPTIONS': {
|
|
|
|
'context_processors': [
|
|
|
|
'django.template.context_processors.debug',
|
|
|
|
'django.template.context_processors.request',
|
|
|
|
'django.contrib.auth.context_processors.auth',
|
|
|
|
'django.contrib.messages.context_processors.messages'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2016-06-29 06:22:52 +00:00
|
|
|
ROOT_URLCONF = 'cas_server.tests.urls'
|
2016-06-25 09:09:46 +00:00
|
|
|
|
|
|
|
# Database
|
|
|
|
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
|
|
|
|
|
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
|
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
2016-06-29 06:22:52 +00:00
|
|
|
'NAME': ':memory:',
|
2016-06-25 09:09:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Internationalization
|
|
|
|
# https://docs.djangoproject.com/en/1.9/topics/i18n/
|
|
|
|
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
|
|
|
|
TIME_ZONE = 'UTC'
|
|
|
|
|
|
|
|
USE_I18N = True
|
|
|
|
|
2022-10-17 17:27:51 +00:00
|
|
|
if django.VERSION < (4, 0):
|
|
|
|
USE_L10N = True
|
2016-06-25 09:09:46 +00:00
|
|
|
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
|
# https://docs.djangoproject.com/en/1.9/howto/static-files/
|
|
|
|
|
|
|
|
STATIC_URL = '/static/'
|
2016-07-29 12:33:02 +00:00
|
|
|
|
|
|
|
CAS_NEW_VERSION_HTML_WARNING = False
|
|
|
|
CAS_NEW_VERSION_EMAIL_WARNING = False
|
2016-08-01 16:36:12 +00:00
|
|
|
|
|
|
|
LOGGING = {
|
|
|
|
'version': 1,
|
|
|
|
'disable_existing_loggers': False,
|
|
|
|
'formatters': {
|
|
|
|
'cas_file': {
|
|
|
|
'format': '%(asctime)s %(levelname)s %(message)s'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'handlers': {
|
|
|
|
'cas_stream': {
|
|
|
|
'level': 'INFO',
|
|
|
|
'class': 'logging.StreamHandler',
|
|
|
|
'formatter': 'cas_file',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'loggers': {
|
|
|
|
'cas_server': {
|
|
|
|
'handlers': ['cas_stream'],
|
|
|
|
'level': 'INFO',
|
|
|
|
'propagate': True,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|