From 3b5ef3b0a88247eeafeee878de528aad71f9fd4b Mon Sep 17 00:00:00 2001 From: maxbr Date: Fri, 19 Aug 2016 17:10:31 +0200 Subject: Split the dashboard into different apps, add tests JIRA: RELENG-12 Signed-off-by: maxbr --- .../pharos-dashboard/pharos_dashboard/settings.py | 47 +++++++++++++++------- 1 file changed, 32 insertions(+), 15 deletions(-) (limited to 'tools/pharos-dashboard/pharos_dashboard/settings.py') diff --git a/tools/pharos-dashboard/pharos_dashboard/settings.py b/tools/pharos-dashboard/pharos_dashboard/settings.py index 2bc94965..b6e98991 100644 --- a/tools/pharos-dashboard/pharos_dashboard/settings.py +++ b/tools/pharos-dashboard/pharos_dashboard/settings.py @@ -1,13 +1,13 @@ """ -Django settings for opnfvdashboard project. +Django settings for pharos_dashboard project. -Generated by 'django-admin startproject' using Django 1.9.7. +Generated by 'django-admin startproject' using Django 1.10. For more information on this file, see -https://docs.djangoproject.com/en/1.9/topics/settings/ +https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see -https://docs.djangoproject.com/en/1.9/ref/settings/ +https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os @@ -15,39 +15,45 @@ import os # 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/ +# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '=awtgkzaq@ytwbsp$$n=7=m&9*cm7gci7o-dy07)!x1um=g(gf' +SECRET_KEY = 'j*mq-lt&^*9e$%4mtc)f2$_i(wky#g@ycl3@&$^5n89a3^i)7i' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] + # Application definition INSTALLED_APPS = [ 'dashboard', + 'booking', + 'account', + 'jenkins', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'bootstrap3' + 'django.contrib.humanize', + 'bootstrap3', ] -MIDDLEWARE_CLASSES = [ +MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'account.middleware.TimezoneMiddleware', ] ROOT_URLCONF = 'pharos_dashboard.urls' @@ -71,8 +77,9 @@ TEMPLATES = [ WSGI_APPLICATION = 'pharos_dashboard.wsgi.application' + # Database -# https://docs.djangoproject.com/en/1.9/ref/settings/#databases +# https://docs.djangoproject.com/en/1.10/ref/settings/#databases DATABASES = { 'default': { @@ -85,8 +92,9 @@ DATABASES = { } } + # Password validation -# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators +# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { @@ -103,10 +111,8 @@ AUTH_PASSWORD_VALIDATORS = [ }, ] -LOGIN_REDIRECT_URL = '/' - # Internationalization -# https://docs.djangoproject.com/en/1.9/topics/i18n/ +# https://docs.djangoproject.com/en/1.10/topics/i18n/ LANGUAGE_CODE = 'en-us' @@ -118,7 +124,18 @@ USE_L10N = True USE_TZ = True + # Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.9/howto/static-files/ +# https://docs.djangoproject.com/en/1.10/howto/static-files/ STATIC_URL = '/static/' + +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, "static"), +] + +BOOTSTRAP3 = { + 'set_placeholder': False, +} + +LOGIN_REDIRECT_URL = '/' -- cgit 1.2.3-korg