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
# Absolute 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_collected/')
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.AppDirectoriesFinder',
80
'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',
64
'pagination.middleware.PaginationMiddleware',
67
ROOT_URLCONF = 'widelands.urls'
70
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
71
# Always use forward slashes, even on Windows.
72
# Don't forget to use absolute paths, not relative paths.
73
'/var/www/django_projects/widelands/templates',
76
TEMPLATE_CONTEXT_PROCESSORS = (
77
"django.core.context_processors.auth",
78
"django.core.context_processors.debug",
79
"django.core.context_processors.i18n",
80
"django.core.context_processors.media",
81
'django.core.context_processors.request',
84
############################
85
# Activation configuration #
86
############################
87
DEFAULT_FROM_EMAIL = 'noreply@widelands.org'
88
ACCOUNT_ACTIVATION_DAYS=2 # Days an activation token keeps active
90
######################
91
# Wiki configuration #
92
######################
93
WIKI_LOCK_DURATION = 30
81
97
'django.contrib.auth',
82
98
'django.contrib.contenttypes',
83
99
'django.contrib.sessions',
84
'django.contrib.messages',
85
'django.contrib.staticfiles',
86
100
'django.contrib.sites',
87
'django.contrib.humanize',
88
'django.contrib.sitemaps',
89
'nocaptcha_recaptcha',
101
'django.contrib.admin',
102
'django.contrib.markup',
104
# TODO: only temporary for webdesign stuff
105
'django.contrib.webdesign',
92
'wiki.templatetags.restructuredtext',
101
'wlmaps.apps.WlMapsConfig',
105
'check_input.apps.CheckInput',
107
'privacy_policy.apps.PrivacyPolicyConfig',
108
'haystack', # search engine; see option HAYSTACK_CONNECTIONS
110
# Modified 3rd party apps
111
'wiki.apps.WikiConfig', # This is based on wikiapp, but has some local modifications
112
'news', # This is based on simple-blog, but has some local modifications
113
'pybb.apps.PybbConfig', # Feature enriched version of pybb
108
'widelands.mainpage',
109
'widelands.wiki', # This is based on wikiapp, but has some local modifications
115
111
# Thirdparty apps
116
'threadedcomments', # included as wlapp
117
'notification', # included as wlapp
118
'django_messages_wl.apps.WLDjangoMessagesConfig',
112
'registration', # User registration (per Email validation)
125
'django.middleware.security.SecurityMiddleware',
126
'django.contrib.sessions.middleware.SessionMiddleware',
127
'django.middleware.common.CommonMiddleware',
128
'django.middleware.csrf.CsrfViewMiddleware',
129
'django.contrib.auth.middleware.AuthenticationMiddleware',
130
'django.contrib.messages.middleware.MessageMiddleware',
131
'django.middleware.clickjacking.XFrameOptionsMiddleware',
134
'dj_pagination.middleware.PaginationMiddleware',
135
'online_users_middleware.OnlineNowMiddleware',
140
'BACKEND': 'django.template.backends.django.DjangoTemplates',
141
'DIRS': [os.path.join(BASE_DIR, 'templates')],
144
'context_processors': [
145
'django.template.context_processors.debug',
146
'django.template.context_processors.request',
147
'django.contrib.auth.context_processors.auth',
148
'django.contrib.messages.context_processors.messages',
149
'django.template.context_processors.i18n',
150
'django.template.context_processors.media',
151
'django.template.context_processors.static',
152
'django.template.context_processors.tz',
153
'django_messages.context_processors.inbox',
154
'wlprofile.context_processors.deleted_user_data',
160
############################
161
# Activation configuration #
162
############################
163
DEFAULT_FROM_EMAIL = 'noreply@widelands.org'
164
ACCOUNT_ACTIVATION_DAYS = 2 # Days an activation token keeps active
166
# Franku: SHA1 Needed as compatibility for old passwords
167
# https://docs.djangoproject.com/en/1.11/releases/1.10/#removed-weak-password-hashers-from-the-default-password-hashers-setting
169
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
170
'django.contrib.auth.hashers.SHA1PasswordHasher'
173
######################
174
# Wiki configuration #
175
######################
176
WIKI_LOCK_DURATION = 30
177
WIKI_URL_RE = r'[:\-\w ]+'
178
WIKI_WORD_RE = r'[:\-\w ]+'
180
######################
181
# User configuration #
182
######################
183
DEFAULT_TIME_ZONE = 3 # See wlprofile.templatetags.custom_date
184
DEFAULT_TIME_DISPLAY = r"%ND(Y-m-d,) H:i" # According to ISO 8601
185
DEFAULT_MARKUP = 'markdown'
186
SIGNATURE_MAX_LENGTH = 255
187
SIGNATURE_MAX_LINES = 8
188
AVATARS_UPLOAD_TO = 'profile/avatars'
189
AVATAR_HEIGHT = AVATAR_WIDTH = 80
191
######################
192
# Pybb Configuration #
193
######################
194
PYBB_ATTACHMENT_ENABLE = False # disable gzip middleware when enabling attachments
195
PYBB_DEFAULT_MARKUP = 'markdown'
196
PYBB_FREEZE_FIRST_POST = False
198
##############################################
199
# Link classification and other Markup stuff #
200
##############################################
202
'xoops.widelands.org'
205
SMILEY_DIR = STATIC_URL + 'img/smileys/'
206
# Keep this list ordered by length of smileys
208
('O:-)', 'face-angel.png'),
209
('O:)', 'face-angel.png'),
210
(':-/', 'face-confused.png'),
211
(':/', 'face-confused.png'),
212
('B-)', 'face-cool.png'),
213
('B)', 'face-cool.png'),
214
(":'-(", 'face-crying.png'),
215
(":'(", 'face-crying.png'),
216
(':-))', 'face-smile-big.png'),
217
(':))', 'face-smile-big.png'),
218
(':-)', 'face-smile.png'),
219
(':)', 'face-smile.png'),
220
(']:-)', 'face-devilish.png'),
221
('8-)', 'face-glasses.png'),
222
('8)', 'face-glasses.png'),
223
(':-D', 'face-grin.png'),
224
(':D', 'face-grin.png'),
225
(':-x', 'face-kiss.png'),
226
(':x', 'face-kiss.png'),
227
(':-*', 'face-kiss.png'),
228
(':*', 'face-kiss.png'),
229
(':-((', 'face-mad.png'),
230
(':((', 'face-mad.png'),
231
(':-||', 'face-mad.png'),
232
(':||', 'face-mad.png'),
233
(':(|)', 'face-monkey.png'),
234
(':-|', 'face-plain.png'),
235
(':|', 'face-plain.png'),
236
(':-(', 'face-sad.png'),
237
(':(', 'face-sad.png'),
238
(':-O', 'face-shock.png'),
239
(':O', 'face-shock.png'),
240
(':-o', 'face-surprise.png'),
241
(':o', 'face-surprise.png'),
242
(':-P', 'face-tongue.png'),
243
(':P', 'face-tongue.png'),
244
(':-S', 'face-upset.png'),
245
(':S', 'face-upset.png'),
246
(';-)', 'face-wink.png'),
247
(';)', 'face-wink.png'),
253
HAYSTACK_CONNECTIONS = {
255
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
256
'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'),
260
###########################
261
# Widelands SVN directory #
262
###########################
263
# This is needed for various thinks, for example
264
# to access media (for minimap creation) or for online help
265
# or for ChangeLog displays
266
WIDELANDS_SVN_DIR = ''
271
THUMBNAIL_SIZE = (160, 160)
278
##############################################
279
## Recipient(s) who get an email if someone ##
280
## uses the form on legal notice page ##
281
## Use allways the form ('name', 'Email') ##
282
##############################################
283
INQUIRY_RECIPIENTS = [
284
('peter', 'peter@example.com'),
287
##########################################
288
## Allowed tags/attributes for 'bleach' ##
289
## Used for sanitizing user input. ##
290
##########################################
291
BLEACH_ALLOWED_TAGS = [u'a',
296
u'em', u'i', u'strong', u'b',
299
u'h1', u'h2', u'h3', u'h4', u'h5', u'h6',
303
u'table', u'tbody', u'thead', u'th', u'tr', u'td',
307
BLEACH_ALLOWED_ATTRIBUTES = {'img': ['src', 'alt'], 'a': [
308
'href'], 'td': ['align'], '*': ['class', 'id', 'title']}
310
##########################
311
# Pagination settings #
312
# for dj-pagination #
313
##########################
314
PAGINATION_DEFAULT_WINDOW = 2
316
###########################
317
# Settings for displaying #
319
###########################
321
# Time in seconds how long a user will be shown online
322
ONLINE_THRESHOLD = 60 * 15
323
# Number of stored users
326
###########################################
327
# Settings for users who deleted themself #
328
###########################################
330
DELETED_MAIL_ADDRESS = ''
331
DELETED_USERNAME = 'Ex-Member'
337
# See: https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-age
338
CSRF_COOKIE_AGE = None
340
#############################
341
# star_rating configuration #
342
#############################
344
STAR_RATINGS_STAR_HEIGHT = 14
345
STAR_RATINGS_STAR_WIDTH = 14
346
STAR_RATINGS_RANGE = 10
349
118
from local_settings import *