-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsettings.py
228 lines (180 loc) · 6.54 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# Django settings for itcq project.
import os
PROJECT_DIR = os.path.dirname(__file__)
# Add apps to project.
os.sys.path.append(os.path.join(PROJECT_DIR, 'apps'))
gettext = lambda s: s
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Tom Parslow', '[email protected]'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'mkeller_itcm',
'USER': 'mkeller_itcm',
'PASSWORD': 'eye1cee2tee3queue4',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
ALLOWED_HOSTS = ["mkeller.webfactional.com", "itcm-sussex.org", "www.itcm-sussex.org", "itcm-sussex.com", "www.itcm-sussex.com"]
EMAIL_HOST_PASSWORD = "9e32902ryf4"
EMAIL_HOST_USER = "itcm"
EMAIL_HOST = 'smtp.webfaction.com'
DEFAULT_FROM_EMAIL = '[email protected]'
SERVER_EMAIL = '[email protected]'
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'Europe/London'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-gb'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = False
# Absolute path to the directory that holds media.
MEDIA_ROOT = os.path.join(PROJECT_DIR, '../media/')
#ADMIN_MEDIA_ROOT = os.path.join(PROJECT_DIR, '../admin_media/')
MEDIA_URL = '/media/'
CMS_PAGE_MEDIA_PATH = "cms_page_media"
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(PROJECT_DIR, '..', 'collected_static')
# ADMIN_MEDIA_PREFIX = '/media/admin/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = 't@)am85)xqlwhb_4@se5m^1y1_n$lf!x%8-o3l$ne8gs!k6##p'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.load_template_source',
)
# STATICFILES_FINDERS = (
# "django.contrib.staticfiles.finders.FileSystemFinder",
# "django.contrib.staticfiles.finders.AppDirectoriesFinder")
# STATICFILES_DIRS = (
# os.path.join(PROJECT_DIR, 'apps', 'itcq', 'static'),
# )
MIDDLEWARE_CLASSES = (
'django.middleware.transaction.TransactionMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.common.CommonMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.language.LanguageCookieMiddleware',
#'itcq.middleware.PrivateDraft',
#'cms.middleware.multilingual.MultilingualURLMiddleware',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.i18n',
'django.core.context_processors.request',
'django.core.context_processors.media',
"django.core.context_processors.static",
"django.core.context_processors.debug",
'sekizai.context_processors.sekizai',
"cms.context_processors.cms_settings",
)
ROOT_URLCONF = 'urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(PROJECT_DIR, 'templates'),
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.sites',
'django.contrib.staticfiles',
'djangocms_text_ckeditor', # should be set before cms
'cms',
'mptt',
'menus',
'south',
'sekizai',
'djangocms_admin_style',
'reversion',
'south',
# 'djangocms_picture',
# 'djangocms_file',
# 'djangocms_flash',
# 'djangocms_link',
# 'cms.plugins.googlemap',
# 'cms.plugins.snippet',
'itcq',
# 'ao',
'itcq.plugins.researchareapreview',
'itcq.plugins.publicationslist',
'itcq.plugins.linklist',
'itcq.plugins.heading',
'itcq.plugins.person',
'itcq.plugins.itcqpicture',
'itcq.plugins.itcqflash',
# 'haystack',
'tinymce',
# 'publisher', # post publisher
)
CMS_TEMPLATES = (
('itcq/default.html', gettext('default')),
('itcq/withsubnav.html', gettext('Page with sub-navigation')),
('itcq/subnavpicsleft.html', gettext('Page with sub-navigation (pictures on the left)')),
('itcq/subnavpicsright.html', gettext('Page with sub-navigation (pictures on the right)')),
('itcq/home.html', gettext('Home page')),
('itcq/intmeeting.html', gettext('International Symposium on Cavity-QED')),
)
CMS_PLACEHOLDER_CONF = {
'right-column': {
"plugins": ('FilePlugin','FlashPlugin','LinkPlugin','PicturePlugin','TextPlugin', 'SnippetsPlugin'),
"extra_context": {"theme":"16_16"},
"name":gettext("right column")
},
'body': {
"extra_context": {"theme":"16_5"},
"name":gettext("body"),
},
'fancy-content': {
"plugins": ('TextPlugin', 'LinkPlugin'),
"extra_context": {"theme":"16_11"},
"name":gettext("fancy content"),
},
}
CMS_MODERATOR = True
CMS_REDIRECTS = True
CMS_SEO_FIELDS = True
CMS_MENU_TITLE_OVERWRITE = True
CMS_PERMISSIONS = False
CMS_LANGUAGE_REDIRECT = False
# CMS_USE_TINYMCE = True
CMS_SOFTROOT = True
TINYMCE_DEFAULT_CONFIG = {'theme': "advanced"}
WYM_CONTAINERS = ",\n".join([
"{'name': 'P', 'title': 'Paragraph', 'css': 'wym_containers_p'}",
"{'name': 'H1', 'title': 'Heading_1', 'css': 'wym_containers_h1'}",
"{'name': 'H2', 'title': 'Heading_2', 'css': 'wym_containers_h2'}",
"{'name': 'PRE', 'title': 'Preformatted', 'css': 'wym_containers_pre'}",
"{'name': 'BLOCKQUOTE', 'title': 'Blockquote', 'css': 'wym_containers_blockquote'}",
])
WYM_CLASSES = ""
HAYSTACK_SEARCH_ENGINE = 'whoosh'
HAYSTACK_WHOOSH_PATH = '/home/mkeller/whoosh/itcq_index'
try:
from local_settings import *
except ImportError:
pass