49
55
# Examples: "http://media.lawrence.com", "http://example.com/media/"
50
56
MEDIA_URL = '/wlmedia/'
52
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
54
# Examples: "http://foo.com/media/", "/media/".
55
ADMIN_MEDIA_PREFIX = '/media/'
57
58
# Make this unique, and don't share it with anybody.
58
59
SECRET_KEY = '#*bc7*q0-br42fc&6l^x@zzk&(=-#gr!)fn@t30n54n05jkqcu'
60
# List of callables that know how to import templates from various sources.
62
'django.template.loaders.filesystem.Loader',
63
'django.template.loaders.app_directories.Loader',
64
# 'django.template.loaders.eggs.load_template_source',
63
# List of finder classes that know how to find static files in
65
STATICFILES_FINDERS = [
66
"django.contrib.staticfiles.finders.FileSystemFinder",
67
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
71
'django.contrib.admin',
72
'django.contrib.auth',
73
'django.contrib.contenttypes',
74
'django.contrib.sessions',
75
'django.contrib.messages',
76
'django.contrib.staticfiles',
77
'django.contrib.sites',
78
'django.contrib.humanize',
80
'nocaptcha_recaptcha',
81
# Thirdparty apps, but need preload
82
'tracking', # included as wlapp
85
'wiki.templatetags.restructuredtext',
98
# Modified 3rd party apps
99
'wiki', # This is based on wikiapp, but has some local modifications
100
'news', # This is based on simple-blog, but has some local modifications
102
'pybb', # Feature enriched version of pybb
105
'threadedcomments', # included as wlapp
106
'notification', # included as wlapp
109
'linaro_django_pagination',
111
'djangoratings', # included as wlapp
112
'sphinxdoc', # included as wlapp
113
#'south', included in django itself
67
116
MIDDLEWARE_CLASSES = (
68
117
# 'simplestats.middleware.RegexLoggingMiddleware',
69
'django.middleware.gzip.GZipMiddleware', # Remove this, when load gets to high or attachments are enabled
70
118
'django.middleware.common.CommonMiddleware',
71
119
'django.contrib.sessions.middleware.SessionMiddleware',
120
'django.contrib.messages.middleware.MessageMiddleware',
72
121
'django.middleware.csrf.CsrfViewMiddleware',
73
122
'django.contrib.auth.middleware.AuthenticationMiddleware',
74
'pagination.middleware.PaginationMiddleware',
123
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
124
'django.middleware.clickjacking.XFrameOptionsMiddleware',
125
'django.middleware.security.SecurityMiddleware',
127
# Remove this, when load gets to high or attachments are enabled
128
'django.middleware.gzip.GZipMiddleware',
129
#'pagination.middleware.PaginationMiddleware',
130
'linaro_django_pagination.middleware.PaginationMiddleware',
75
131
'tracking.middleware.VisitorTrackingMiddleware',
76
132
'tracking.middleware.VisitorCleanUpMiddleware',
79
ROOT_URLCONF = 'widelands.urls'
82
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
83
# Always use forward slashes, even on Windows.
84
# Don't forget to use absolute paths, not relative paths.
85
'/var/www/django_projects/widelands/templates',
88
TEMPLATE_CONTEXT_PROCESSORS = (
89
"django.contrib.auth.context_processors.auth",
90
"django_messages.context_processors.inbox",
91
"django.core.context_processors.debug",
92
"django.core.context_processors.i18n",
93
"django.core.context_processors.media",
94
'django.core.context_processors.request',
95
'widelands.mainpage.context_processors.settings_for_templates',
137
'BACKEND': 'django.template.backends.django.DjangoTemplates',
138
'DIRS': [os.path.join(BASE_DIR, 'templates')],
141
'context_processors': [
142
'django.template.context_processors.debug',
143
'django.template.context_processors.request',
144
'django.contrib.auth.context_processors.auth',
145
'django.contrib.messages.context_processors.messages',
146
'django.template.context_processors.i18n',
147
'django.template.context_processors.media',
148
'django.template.context_processors.static',
149
'django.template.context_processors.tz',
150
'django_messages.context_processors.inbox',
151
'mainpage.context_processors.settings_for_templates'
157
# Static files (CSS, JavaScript, Images)
158
# https://docs.djangoproject.com/en/1.8/howto/static-files/
159
STATIC_URL = '/media/'
98
161
############################
99
162
# Activation configuration #
100
163
############################
101
164
DEFAULT_FROM_EMAIL = 'noreply@widelands.org'
102
ACCOUNT_ACTIVATION_DAYS=2 # Days an activation token keeps active
165
ACCOUNT_ACTIVATION_DAYS = 2 # Days an activation token keeps active
104
167
######################
105
168
# Wiki configuration #
131
196
# Link classification and other Markup stuff #
132
197
##############################################
133
198
LOCAL_DOMAINS = [
134
"xoops.widelands.org"
199
'xoops.widelands.org'
136
SMILEY_DIR = MEDIA_URL + "img/smileys/"
202
SMILEY_DIR = MEDIA_URL + 'img/smileys/'
137
203
# Keep this list ordered by length of smileys
139
("O:-)", "face-angel.png"),
140
("O:)", "face-angel.png"),
141
(":-/", "face-confused.png"),
142
(":/", "face-confused.png"),
143
("B-)", "face-cool.png"),
144
("B)", "face-cool.png"),
145
(":'-(", "face-crying.png"),
146
(":'(", "face-crying.png"),
147
(":-))", "face-smile-big.png"),
148
(":))", "face-smile-big.png"),
149
(":-)", "face-smile.png"),
150
(":)", "face-smile.png"),
151
(">:-)", "face-devilish.png"), # Hack around markdown replacement. see also SMILEY_PREESCAPING
152
("8-)", "face-glasses.png"),
153
("8)", "face-glasses.png"),
154
(":-D", "face-grin.png"),
155
(":D", "face-grin.png"),
156
(":-x", "face-kiss.png"),
157
(":x", "face-kiss.png"),
158
(":-*", "face-kiss.png"),
159
(":*", "face-kiss.png"),
160
(":-((", "face-mad.png"),
161
(":((", "face-mad.png"),
162
(":-||", "face-mad.png"),
163
(":||", "face-mad.png"),
164
(":(|)", "face-monkey.png"),
165
(":-|", "face-plain.png"),
166
(":|", "face-plain.png"),
167
(":-(", "face-sad.png"),
168
(":(", "face-sad.png"),
169
(":-O", "face-shock.png"),
170
(":O", "face-shock.png"),
171
(":-o", "face-surprise.png"),
172
(":o", "face-surprise.png"),
173
(":-P", "face-tongue.png"),
174
(":P", "face-tongue.png"),
175
(":-S", "face-upset.png"),
176
(":S", "face-upset.png"),
177
(";-)", "face-wink.png"),
178
(";)", "face-wink.png"),
205
('O:-)', 'face-angel.png'),
206
('O:)', 'face-angel.png'),
207
(':-/', 'face-confused.png'),
208
(':/', 'face-confused.png'),
209
('B-)', 'face-cool.png'),
210
('B)', 'face-cool.png'),
211
(":'-(", 'face-crying.png'),
212
(":'(", 'face-crying.png'),
213
(':-))', 'face-smile-big.png'),
214
(':))', 'face-smile-big.png'),
215
(':-)', 'face-smile.png'),
216
(':)', 'face-smile.png'),
217
# Hack around markdown replacement. see also SMILEY_PREESCAPING
218
('>:-)', 'face-devilish.png'),
219
('8-)', 'face-glasses.png'),
220
('8)', 'face-glasses.png'),
221
(':-D', 'face-grin.png'),
222
(':D', 'face-grin.png'),
223
(':-x', 'face-kiss.png'),
224
(':x', 'face-kiss.png'),
225
(':-*', 'face-kiss.png'),
226
(':*', 'face-kiss.png'),
227
(':-((', 'face-mad.png'),
228
(':((', 'face-mad.png'),
229
(':-||', 'face-mad.png'),
230
(':||', 'face-mad.png'),
231
(':(|)', 'face-monkey.png'),
232
(':-|', 'face-plain.png'),
233
(':|', 'face-plain.png'),
234
(':-(', 'face-sad.png'),
235
(':(', 'face-sad.png'),
236
(':-O', 'face-shock.png'),
237
(':O', 'face-shock.png'),
238
(':-o', 'face-surprise.png'),
239
(':o', 'face-surprise.png'),
240
(':-P', 'face-tongue.png'),
241
(':P', 'face-tongue.png'),
242
(':-S', 'face-upset.png'),
243
(':S', 'face-upset.png'),
244
(';-)', 'face-wink.png'),
245
(';)', 'face-wink.png'),
180
247
# This needs to be done to keep some stuff hidden from markdown
181
248
SMILEY_PREESCAPING = [
185
252
###############################
186
253
# Sphinx (Search prog) Config #
187
254
###############################
189
256
SPHINX_API_VERSION = 0x116
194
TRACKING_CLEANUP_TIMEOUT=48
261
TRACKING_CLEANUP_TIMEOUT = 48
196
263
###########################
197
264
# Widelands SVN directory #
199
266
# This is needed for various thinks, for example
200
267
# to access media (for minimap creation) or for online help
201
268
# or for ChangeLog displays
269
WIDELANDS_SVN_DIR = ''
204
271
#####################
205
272
# ChangeLog display #
206
273
#####################
207
BZR_URL = r"http://bazaar.launchpad.net/%%7Ewidelands-dev/widelands/trunk/revision/%s"
274
# NOCOMM franku: This is only used in mainpage/wl_markdown/templatetags/wl_markdon.py/_insert_revision()
275
# Since there is a plan to have only some prosa in the Changelog, both (this setting and the function)
276
# could be removed. It didn't worked either...
277
BZR_URL = r'http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/revision/%s'
212
THUMBNAIL_SIZE = ( 160, 160 )
282
THUMBNAIL_SIZE = (160, 160)
217
287
MAPS_PER_PAGE = 10
220
'django.contrib.auth',
221
'django.contrib.contenttypes',
222
'django.contrib.sessions',
223
'django.contrib.sites',
224
'django.contrib.admin',
225
'django.contrib.markup',
226
'django.contrib.humanize',
228
# TODO: only temporary for webdesign stuff
229
'django.contrib.webdesign',
231
# Thirdparty apps, but need preload
235
'widelands.mainpage',
237
'widelands.wlimages',
238
'widelands.wlwebchat',
239
'widelands.wlrecaptcha',
240
'widelands.wlprofile',
241
'widelands.wlsearch',
243
'widelands.wlevents',
245
'widelands.wlscreens',
248
# Modified 3rd party apps
249
'widelands.wiki', # This is based on wikiapp, but has some local modifications
250
'widelands.news', # This is based on simple-blog, but has some local modifications
251
'pybb', # Feature enriched version of pybb
256
'registration', # User registration (per Email validation)
265
USE_GOOGLE_ANALYTICS=False
290
USE_GOOGLE_ANALYTICS = False
267
292
##############################################
268
293
## Recipient(s) who get an email if someone ##
269
## uses the on legal notice page ##
294
## uses the form on legal notice page ##
270
295
## Use allways the form ('name', 'Email') ##
271
296
##############################################
272
INQUIRY_RECIPIENTS = (
273
('franku','somal@arcor.de'),
297
INQUIRY_RECIPIENTS = [
298
('peter', 'peter@example.com'),
301
##########################################
302
## Allowed tags/attributes for 'bleach' ##
303
## Used for sanitizing user input. ##
304
##########################################
305
BLEACH_ALLOWED_TAGS = [u'a',
310
u'em', u'i', u'strong', u'b',
313
u'h1', u'h2', u'h3', u'h4', u'h5', u'h6',
317
u'table', u'tbody', u'thead', u'th', u'tr', u'td',
321
BLEACH_ALLOWED_ATTRIBUTES = {'img': ['src', 'alt'], 'a': ['href'], '*': ['class', 'id', 'title']}
277
from local_settings import *
324
from local_settings import *
278
325
except ImportError: