31
22
# If running in a Windows environment this must be set to the same as your
32
23
# system time zone.
33
24
TIME_ZONE = 'Europe/Berlin'
34
USE_TZ = False # See https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-TIME_ZONE
36
26
# Language code for this installation. All choices can be found here:
37
27
# http://www.i18nguy.com/unicode/language-identifiers.html
42
# Where should logged in user go by default?
43
LOGIN_REDIRECT_URL = '/'
45
32
# If you set this to False, Django will make some optimizations so as not
46
33
# to load the internationalization machinery.
49
36
# Absolute path to the directory that holds media.
50
37
# Example: "/home/media/media.lawrence.com/"
51
# Overwritten in local_settings.py
54
40
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
55
41
# trailing slash if there is a path component (optional in other cases).
56
42
# Examples: "http://media.lawrence.com", "http://example.com/media/"
57
MEDIA_URL = '/wlmedia/'
59
# Absoltute path where static files from thirdparty apps will be collected using
60
# the command: ./manage.py collectstatic
61
STATIC_ROOT = os.path.join(BASE_DIR, 'media/static_foreign/')
63
# URL to use when referring to static files located in STATIC_ROOT.
64
# Must be different than MEDIA_URL!
65
# https://docs.djangoproject.com/en/1.8/howto/static-files/
66
STATIC_URL = '/static/'
45
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
47
# Examples: "http://foo.com/media/", "/media/".
48
ADMIN_MEDIA_PREFIX = '/media/'
68
50
# Make this unique, and don't share it with anybody.
69
51
SECRET_KEY = '#*bc7*q0-br42fc&6l^x@zzk&(=-#gr!)fn@t30n54n05jkqcu'
73
# List of finder classes that know how to find static files in
75
STATICFILES_FINDERS = [
76
'django.contrib.staticfiles.finders.FileSystemFinder',
77
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
81
'django.contrib.admin',
53
# List of callables that know how to import templates from various sources.
55
'django.template.loaders.filesystem.load_template_source',
56
'django.template.loaders.app_directories.load_template_source',
57
# 'django.template.loaders.eggs.load_template_source',
60
MIDDLEWARE_CLASSES = (
61
'django.middleware.common.CommonMiddleware',
62
'django.contrib.sessions.middleware.SessionMiddleware',
63
'django.contrib.auth.middleware.AuthenticationMiddleware',
66
ROOT_URLCONF = 'widelands.urls'
69
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
70
# Always use forward slashes, even on Windows.
71
# Don't forget to use absolute paths, not relative paths.
72
'/var/www/django_projects/widelands/templates',
82
76
'django.contrib.auth',
83
77
'django.contrib.contenttypes',
84
78
'django.contrib.sessions',
85
'django.contrib.messages',
86
'django.contrib.staticfiles',
87
79
'django.contrib.sites',
88
'django.contrib.humanize',
89
'django.contrib.sitemaps',
90
'nocaptcha_recaptcha',
80
'django.contrib.admin',
93
'wiki.templatetags.restructuredtext',
102
'wlmaps.apps.WlMapsConfig',
106
'check_input.apps.CheckInput',
108
'privacy_policy.apps.PrivacyPolicyConfig',
109
'haystack', # search engine; see option HAYSTACK_CONNECTIONS
111
# Modified 3rd party apps
112
'wiki.apps.WikiConfig', # This is based on wikiapp, but has some local modifications
113
'news', # This is based on simple-blog, but has some local modifications
115
'pybb.apps.PybbConfig', # Feature enriched version of pybb
118
'threadedcomments', # included as wlapp
119
'notification', # included as wlapp
120
'django_messages_wl.apps.WLDjangoMessagesConfig',
127
'django.middleware.security.SecurityMiddleware',
128
'django.contrib.sessions.middleware.SessionMiddleware',
129
'django.middleware.common.CommonMiddleware',
130
'django.middleware.csrf.CsrfViewMiddleware',
131
'django.contrib.auth.middleware.AuthenticationMiddleware',
132
'django.contrib.messages.middleware.MessageMiddleware',
133
'django.middleware.clickjacking.XFrameOptionsMiddleware',
136
'dj_pagination.middleware.PaginationMiddleware',
137
'online_users_middleware.OnlineNowMiddleware',
142
'BACKEND': 'django.template.backends.django.DjangoTemplates',
143
'DIRS': [os.path.join(BASE_DIR, 'templates')],
146
'context_processors': [
147
'django.template.context_processors.debug',
148
'django.template.context_processors.request',
149
'django.contrib.auth.context_processors.auth',
150
'django.contrib.messages.context_processors.messages',
151
'django.template.context_processors.i18n',
152
'django.template.context_processors.media',
153
'django.template.context_processors.static',
154
'django.template.context_processors.tz',
155
'django_messages.context_processors.inbox',
156
'wlprofile.context_processors.deleted_user_data',
162
############################
163
# Activation configuration #
164
############################
165
DEFAULT_FROM_EMAIL = 'noreply@widelands.org'
166
ACCOUNT_ACTIVATION_DAYS = 2 # Days an activation token keeps active
168
# Franku: SHA1 Needed as compatibility for old passwords
169
# https://docs.djangoproject.com/en/1.11/releases/1.10/#removed-weak-password-hashers-from-the-default-password-hashers-setting
171
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
172
'django.contrib.auth.hashers.SHA1PasswordHasher'
175
######################
176
# Wiki configuration #
177
######################
178
WIKI_LOCK_DURATION = 30
179
WIKI_URL_RE = r'[:\-\w ]+'
180
WIKI_WORD_RE = r'[:\-\w ]+'
182
######################
183
# User configuration #
184
######################
185
DEFAULT_TIME_ZONE = 3 # See wlprofile.templatetags.custom_date
186
DEFAULT_TIME_DISPLAY = r"%ND(Y-m-d,) H:i" # According to ISO 8601
187
DEFAULT_MARKUP = 'markdown'
188
SIGNATURE_MAX_LENGTH = 255
189
SIGNATURE_MAX_LINES = 8
190
AVATARS_UPLOAD_TO = 'profile/avatars'
191
AVATAR_HEIGHT = AVATAR_WIDTH = 80
193
######################
194
# Pybb Configuration #
195
######################
196
PYBB_ATTACHMENT_ENABLE = False # disable gzip middleware when enabling attachments
197
PYBB_DEFAULT_MARKUP = 'markdown'
198
PYBB_FREEZE_FIRST_POST = False
200
##############################################
201
# Link classification and other Markup stuff #
202
##############################################
204
'xoops.widelands.org'
207
SMILEY_DIR = MEDIA_URL + 'img/smileys/'
208
# Keep this list ordered by length of smileys
210
('O:-)', 'face-angel.png'),
211
('O:)', 'face-angel.png'),
212
(':-/', 'face-confused.png'),
213
(':/', 'face-confused.png'),
214
('B-)', 'face-cool.png'),
215
('B)', 'face-cool.png'),
216
(":'-(", 'face-crying.png'),
217
(":'(", 'face-crying.png'),
218
(':-))', 'face-smile-big.png'),
219
(':))', 'face-smile-big.png'),
220
(':-)', 'face-smile.png'),
221
(':)', 'face-smile.png'),
222
(']:-)', 'face-devilish.png'),
223
('8-)', 'face-glasses.png'),
224
('8)', 'face-glasses.png'),
225
(':-D', 'face-grin.png'),
226
(':D', 'face-grin.png'),
227
(':-x', 'face-kiss.png'),
228
(':x', 'face-kiss.png'),
229
(':-*', 'face-kiss.png'),
230
(':*', 'face-kiss.png'),
231
(':-((', 'face-mad.png'),
232
(':((', 'face-mad.png'),
233
(':-||', 'face-mad.png'),
234
(':||', 'face-mad.png'),
235
(':(|)', 'face-monkey.png'),
236
(':-|', 'face-plain.png'),
237
(':|', 'face-plain.png'),
238
(':-(', 'face-sad.png'),
239
(':(', 'face-sad.png'),
240
(':-O', 'face-shock.png'),
241
(':O', 'face-shock.png'),
242
(':-o', 'face-surprise.png'),
243
(':o', 'face-surprise.png'),
244
(':-P', 'face-tongue.png'),
245
(':P', 'face-tongue.png'),
246
(':-S', 'face-upset.png'),
247
(':S', 'face-upset.png'),
248
(';-)', 'face-wink.png'),
249
(';)', 'face-wink.png'),
255
HAYSTACK_CONNECTIONS = {
257
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
258
'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'),
262
###########################
263
# Widelands SVN directory #
264
###########################
265
# This is needed for various thinks, for example
266
# to access media (for minimap creation) or for online help
267
# or for ChangeLog displays
268
WIDELANDS_SVN_DIR = ''
273
THUMBNAIL_SIZE = (160, 160)
280
##############################################
281
## Recipient(s) who get an email if someone ##
282
## uses the form on legal notice page ##
283
## Use allways the form ('name', 'Email') ##
284
##############################################
285
INQUIRY_RECIPIENTS = [
286
('peter', 'peter@example.com'),
289
##########################################
290
## Allowed tags/attributes for 'bleach' ##
291
## Used for sanitizing user input. ##
292
##########################################
293
BLEACH_ALLOWED_TAGS = [u'a',
298
u'em', u'i', u'strong', u'b',
301
u'h1', u'h2', u'h3', u'h4', u'h5', u'h6',
305
u'table', u'tbody', u'thead', u'th', u'tr', u'td',
309
BLEACH_ALLOWED_ATTRIBUTES = {'img': ['src', 'alt'], 'a': [
310
'href'], 'td': ['align'], '*': ['class', 'id', 'title']}
312
##########################
313
# Pagination settings #
314
# for dj-pagination #
315
##########################
316
PAGINATION_DEFAULT_WINDOW = 2
318
###########################
319
# Settings for displaying #
321
###########################
323
# Time in seconds how long a user will be shown online
324
ONLINE_THRESHOLD = 60 * 15
325
# Number of stored users
328
###########################################
329
# Settings for users who deleted themself #
330
###########################################
332
DELETED_MAIL_ADDRESS = ''
333
DELETED_USERNAME = 'Ex-Member'
339
# See: https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-age
340
CSRF_COOKIE_AGE = None
342
#############################
343
# star_rating configuration #
344
#############################
346
STAR_RATINGS_STAR_HEIGHT = 14
347
STAR_RATINGS_STAR_WIDTH = 14
348
STAR_RATINGS_RANGE = 10
351
91
from local_settings import *