1
|
# Django settings for wcsinst project.
|
2
|
|
3
|
import os
|
4
|
|
5
|
DEBUG = True
|
6
|
TEMPLATE_DEBUG = DEBUG
|
7
|
|
8
|
PROJECT_PATH = os.path.dirname(os.path.dirname(__file__))
|
9
|
|
10
|
ADMINS = (
|
11
|
# ('Your Name', 'your_email@example.com'),
|
12
|
)
|
13
|
|
14
|
MANAGERS = ADMINS
|
15
|
|
16
|
DATABASES = {
|
17
|
'default': {
|
18
|
'ENGINE': 'django.db.backends.sqlite3',
|
19
|
'NAME': os.path.join(PROJECT_PATH, 'wcsinst.sqlite3'),
|
20
|
}
|
21
|
}
|
22
|
|
23
|
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
24
|
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
25
|
ALLOWED_HOSTS = []
|
26
|
|
27
|
# Local time zone for this installation. Choices can be found here:
|
28
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
29
|
# although not all choices may be available on all operating systems.
|
30
|
# In a Windows environment this must be set to your system time zone.
|
31
|
TIME_ZONE = 'Europe/Brussels'
|
32
|
|
33
|
# Language code for this installation. All choices can be found here:
|
34
|
# http://www.i18nguy.com/unicode/language-identifiers.html
|
35
|
LANGUAGE_CODE = 'fr-fr'
|
36
|
|
37
|
SITE_ID = 1
|
38
|
|
39
|
# If you set this to False, Django will make some optimizations so as not
|
40
|
# to load the internationalization machinery.
|
41
|
USE_I18N = True
|
42
|
|
43
|
# If you set this to False, Django will not format dates, numbers and
|
44
|
# calendars according to the current locale.
|
45
|
USE_L10N = True
|
46
|
|
47
|
# If you set this to False, Django will not use timezone-aware datetimes.
|
48
|
USE_TZ = True
|
49
|
|
50
|
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
51
|
# Example: "/var/www/example.com/media/"
|
52
|
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
|
53
|
|
54
|
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
55
|
# trailing slash.
|
56
|
# Examples: "http://example.com/media/", "http://media.example.com/"
|
57
|
MEDIA_URL = '/media/'
|
58
|
|
59
|
# Absolute path to the directory static files should be collected to.
|
60
|
# Don't put anything in this directory yourself; store your static files
|
61
|
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
62
|
# Example: "/var/www/example.com/static/"
|
63
|
STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
|
64
|
|
65
|
# URL prefix for static files.
|
66
|
# Example: "http://example.com/static/", "http://static.example.com/"
|
67
|
STATIC_URL = '/static/'
|
68
|
|
69
|
# Additional locations of static files
|
70
|
STATICFILES_DIRS = (
|
71
|
os.path.join(PROJECT_PATH, 'wcsinst', 'static'),
|
72
|
)
|
73
|
|
74
|
# List of finder classes that know how to find static files in
|
75
|
# various locations.
|
76
|
STATICFILES_FINDERS = (
|
77
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
78
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
79
|
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
80
|
)
|
81
|
|
82
|
# Make this unique, and don't share it with anybody.
|
83
|
SECRET_KEY = 'sw-v(^psaet3)44flti-zr!=u64mzfeaodkey(m=&^nz(=43!o'
|
84
|
|
85
|
# List of callables that know how to import templates from various sources.
|
86
|
TEMPLATE_LOADERS = (
|
87
|
'django.template.loaders.filesystem.Loader',
|
88
|
'django.template.loaders.app_directories.Loader',
|
89
|
# 'django.template.loaders.eggs.Loader',
|
90
|
)
|
91
|
|
92
|
MIDDLEWARE_CLASSES = (
|
93
|
'django.middleware.common.CommonMiddleware',
|
94
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
95
|
'django.middleware.csrf.CsrfViewMiddleware',
|
96
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
97
|
'django.contrib.messages.middleware.MessageMiddleware',
|
98
|
# Uncomment the next line for simple clickjacking protection:
|
99
|
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
100
|
)
|
101
|
|
102
|
ROOT_URLCONF = 'wcsinst.urls'
|
103
|
|
104
|
# Python dotted path to the WSGI application used by Django's runserver.
|
105
|
WSGI_APPLICATION = 'wcsinst.wsgi.application'
|
106
|
|
107
|
TEMPLATE_DIRS = (
|
108
|
os.path.join(PROJECT_PATH, 'wcsinst', 'templates'),
|
109
|
)
|
110
|
|
111
|
INSTALLED_APPS = (
|
112
|
'south',
|
113
|
'django.contrib.auth',
|
114
|
'django.contrib.contenttypes',
|
115
|
'django.contrib.sessions',
|
116
|
'django.contrib.sites',
|
117
|
'django.contrib.messages',
|
118
|
'django.contrib.staticfiles',
|
119
|
'django.contrib.admin',
|
120
|
)
|
121
|
|
122
|
# A sample logging configuration. The only tangible logging
|
123
|
# performed by this configuration is to send an email to
|
124
|
# the site admins on every HTTP 500 error when DEBUG=False.
|
125
|
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
126
|
# more details on how to customize your logging configuration.
|
127
|
LOGGING = {
|
128
|
'version': 1,
|
129
|
'disable_existing_loggers': False,
|
130
|
'filters': {
|
131
|
'require_debug_false': {
|
132
|
'()': 'django.utils.log.RequireDebugFalse'
|
133
|
}
|
134
|
},
|
135
|
'handlers': {
|
136
|
'mail_admins': {
|
137
|
'level': 'ERROR',
|
138
|
'filters': ['require_debug_false'],
|
139
|
'class': 'django.utils.log.AdminEmailHandler'
|
140
|
}
|
141
|
},
|
142
|
'loggers': {
|
143
|
'django.request': {
|
144
|
'handlers': ['mail_admins'],
|
145
|
'level': 'ERROR',
|
146
|
'propagate': True,
|
147
|
},
|
148
|
}
|
149
|
}
|
150
|
|
151
|
WCSINSTD_URL = os.environ.get('WCSINSTD_URL')
|
152
|
|
153
|
if WCSINSTD_URL:
|
154
|
INSTALLED_APPS += ('wcsinst.wcsinst',)
|
155
|
else:
|
156
|
INSTALLED_APPS += ('wcsinst.wcsinstd',)
|
157
|
|
158
|
WCSINST_WCSCTL_SCRIPT = os.environ.get('WCSINST_WCSCTL_SCRIPT', 'wcsctl')
|
159
|
|
160
|
try:
|
161
|
from local_settings import *
|
162
|
except ImportError:
|
163
|
pass
|