import pharos dashboard code
[pharos.git] / tools / pharos-dashboard / pharos_dashboard / settings.py
1 """
2 Django settings for opnfvdashboard project.
3
4 Generated by 'django-admin startproject' using Django 1.9.7.
5
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.9/topics/settings/
8
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/1.9/ref/settings/
11 """
12
13 import os
14
15 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17
18 # Quick-start development settings - unsuitable for production
19 # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
20
21 # SECURITY WARNING: keep the secret key used in production secret!
22 SECRET_KEY = '=awtgkzaq@ytwbsp$$n=7=m&9*cm7gci7o-dy07)!x1um=g(gf'
23
24 # SECURITY WARNING: don't run with debug turned on in production!
25 DEBUG = True
26
27 ALLOWED_HOSTS = []
28
29 # Application definition
30
31 INSTALLED_APPS = [
32     'dashboard',
33     'django.contrib.admin',
34     'django.contrib.auth',
35     'django.contrib.contenttypes',
36     'django.contrib.sessions',
37     'django.contrib.messages',
38     'django.contrib.staticfiles',
39     'bootstrap3'
40 ]
41
42 MIDDLEWARE_CLASSES = [
43     'django.middleware.security.SecurityMiddleware',
44     'django.contrib.sessions.middleware.SessionMiddleware',
45     'django.middleware.common.CommonMiddleware',
46     'django.middleware.csrf.CsrfViewMiddleware',
47     'django.contrib.auth.middleware.AuthenticationMiddleware',
48     'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
49     'django.contrib.messages.middleware.MessageMiddleware',
50     'django.middleware.clickjacking.XFrameOptionsMiddleware',
51 ]
52
53 ROOT_URLCONF = 'pharos_dashboard.urls'
54
55 TEMPLATES = [
56     {
57         'BACKEND': 'django.template.backends.django.DjangoTemplates',
58         'DIRS': [os.path.join(BASE_DIR, 'templates')]
59         ,
60         'APP_DIRS': True,
61         'OPTIONS': {
62             'context_processors': [
63                 'django.template.context_processors.debug',
64                 'django.template.context_processors.request',
65                 'django.contrib.auth.context_processors.auth',
66                 'django.contrib.messages.context_processors.messages',
67             ],
68         },
69     },
70 ]
71
72 WSGI_APPLICATION = 'pharos_dashboard.wsgi.application'
73
74 # Database
75 # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
76
77 DATABASES = {
78     'default': {
79         'ENGINE': 'django.db.backends.postgresql',
80         'NAME': 'pharos_dashboard',
81         'USER': 'opnfv',
82         'PASSWORD': 'opnfvopnfv',
83         'HOST': 'localhost',
84         'PORT': '',
85     }
86 }
87
88 # Password validation
89 # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
90
91 AUTH_PASSWORD_VALIDATORS = [
92     {
93         'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
94     },
95     {
96         'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
97     },
98     {
99         'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
100     },
101     {
102         'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
103     },
104 ]
105
106 LOGIN_REDIRECT_URL = '/'
107
108 # Internationalization
109 # https://docs.djangoproject.com/en/1.9/topics/i18n/
110
111 LANGUAGE_CODE = 'en-us'
112
113 TIME_ZONE = 'UTC'
114
115 USE_I18N = True
116
117 USE_L10N = True
118
119 USE_TZ = True
120
121 # Static files (CSS, JavaScript, Images)
122 # https://docs.djangoproject.com/en/1.9/howto/static-files/
123
124 STATIC_URL = '/static/'