2 Django settings for sf_t3d project.
4 Generated by 'django-admin startproject' using Django 1.9.
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.9/topics/settings/
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/1.9/ref/settings/
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__
)))
19 # Quick-start development settings - unsuitable for production
20 # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
22 # SECURITY WARNING: keep the secret key used in production secret!
23 SECRET_KEY
= 'o5+o2jv(3-dqr(&ia#-@79cgr%xi*s+6xjws^8cxp211ge#buf'
24 if os
.getenv('DJANGO_ENV') == 'prod':
31 AUTH_USER_MODEL
= "authosm.OsmUser"
33 SITE_NAME
= "Open Source MANO"
34 SHORT_SITE_NAME
= "OSM"
42 # Application definition
44 'django.contrib.admin',
45 'django.contrib.auth',
46 'django.contrib.contenttypes',
47 'django.contrib.messages',
48 'django.contrib.staticfiles',
49 'django.contrib.sessions',
59 MIDDLEWARE_CLASSES
= [
60 'django.middleware.security.SecurityMiddleware',
61 'django.contrib.sessions.middleware.SessionMiddleware',
62 'projecthandler.middleware.OsmProjectMiddleware',
63 'django.middleware.common.CommonMiddleware',
64 'django.middleware.csrf.CsrfViewMiddleware',
65 'django.contrib.auth.middleware.AuthenticationMiddleware',
66 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
67 'django.contrib.messages.middleware.MessageMiddleware',
68 'django.middleware.clickjacking.XFrameOptionsMiddleware',
73 SESSION_ENGINE
='django.contrib.sessions.backends.db'
74 SESSION_COOKIE_AGE
= 3500 #25 min
75 SESSION_EXPIRE_AT_BROWSER_CLOSE
= True
76 SESSION_SAVE_EVERY_REQUEST
= True
78 ROOT_URLCONF
= 'sf_t3d.urls'
82 'BACKEND': 'django.template.backends.django.DjangoTemplates',
84 os
.path
.join(BASE_DIR
, 'template'),
85 os
.path
.join(BASE_DIR
, 'projecthandler', 'template'),
86 os
.path
.join(BASE_DIR
, 'projecthandler', 'template', 'download'),
87 os
.path
.join(BASE_DIR
, 'projecthandler', 'template', 'project'),
88 os
.path
.join(BASE_DIR
, 'vimhandler', 'template'),
89 os
.path
.join(BASE_DIR
, 'instancehandler', 'template'),
90 os
.path
.join(BASE_DIR
, 'sdnctrlhandler', 'template'),
91 os
.path
.join(BASE_DIR
, 'userhandler', 'templates'),
95 'context_processors': [
96 'django.template.context_processors.debug',
97 'django.template.context_processors.request',
98 'django.contrib.auth.context_processors.auth',
99 'django.contrib.messages.context_processors.messages',
100 'sf_t3d.context_processor.conf_constants',
103 'get': 'sf_t3d.templatetags.get',
104 'date_tag': 'sf_t3d.templatetags.datetag',
110 WSGI_APPLICATION
= 'sf_t3d.wsgi.application'
114 # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
118 'ENGINE': 'django.db.backends.sqlite3',
119 'NAME': os
.path
.join(BASE_DIR
, 'db.sqlite3'),
123 AUTHENTICATION_BACKENDS
= ['authosm.backend.OsmBackend']
126 # Password validation
127 # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
129 AUTH_PASSWORD_VALIDATORS
= [
131 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
134 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
137 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
140 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
145 # Internationalization
146 # https://docs.djangoproject.com/en/1.9/topics/i18n/
148 LANGUAGE_CODE
= 'en-us'
159 # Static files (CSS, JavaScript, Images)
160 # https://docs.djangoproject.com/en/1.9/howto/static-files/
162 STATIC_URL
= '/static/'
164 STATICFILES_FINDERS
= (
165 'django.contrib.staticfiles.finders.FileSystemFinder',
166 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
167 'django.contrib.staticfiles.finders.DefaultStorageFinder'
170 # Put strings here, like "/home/html/static" or "C:/www/django/static".
171 # Always use forward slashes, even on Windows.
172 # Don't forget to use absolute paths, not relative paths.
173 os
.path
.join(BASE_DIR
, "static"),
176 STATIC_ROOT
= os
.path
.join(BASE_DIR
, "static/")
179 os
.path
.join(BASE_DIR
, 'locale'),