1
by Holger Rapp
Initial commit of new widelands homepage |
1 |
# Django settings for widelands project.
|
2 |
||
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
3 |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
4 |
import os |
|
5 |
||
429.4.1
by franku
overriding defult views #1 |
6 |
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) |
1
by Holger Rapp
Initial commit of new widelands homepage |
7 |
DEBUG = True |
8 |
||
9 |
ADMINS = ( |
|
10 |
# ('Your Name', 'your_email@domain.com'),
|
|
11 |
)
|
|
12 |
||
13 |
MANAGERS = ADMINS |
|
14 |
||
254
by Holger Rapp
Fixed a few deprecation warnings and reparied cross site scripting fixes for AJAX requests |
15 |
DATABASES = { |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
16 |
'default': { |
17 |
'ENGINE': 'django.db.backends.sqlite3', |
|
18 |
'NAME': 'dev.db', |
|
19 |
'USER': '', # Not used with sqlite3. |
|
20 |
'PASSWORD': '', # Not used with sqlite3. |
|
21 |
# Set to empty string for localhost. Not used with sqlite3.
|
|
22 |
'HOST': '', |
|
23 |
# Set to empty string for default. Not used with sqlite3.
|
|
24 |
'PORT': '', |
|
25 |
}
|
|
254
by Holger Rapp
Fixed a few deprecation warnings and reparied cross site scripting fixes for AJAX requests |
26 |
}
|
1
by Holger Rapp
Initial commit of new widelands homepage |
27 |
|
28 |
# Local time zone for this installation. Choices can be found here:
|
|
29 |
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
|
30 |
# although not all choices may be available on all operating systems.
|
|
31 |
# If running in a Windows environment this must be set to the same as your
|
|
32 |
# system time zone.
|
|
33 |
TIME_ZONE = 'Europe/Berlin' |
|
438.1.6
by franku
run the script |
34 |
USE_TZ = False # See https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-TIME_ZONE |
1
by Holger Rapp
Initial commit of new widelands homepage |
35 |
|
36 |
# Language code for this installation. All choices can be found here:
|
|
37 |
# http://www.i18nguy.com/unicode/language-identifiers.html
|
|
325.1.4
by Shevonar
Added new design for forums |
38 |
LANGUAGE_CODE = 'en' |
1
by Holger Rapp
Initial commit of new widelands homepage |
39 |
|
40 |
SITE_ID = 1 |
|
41 |
||
264
by Holger Rapp
No more direct logging in on the page to prevent CSRF attacks |
42 |
# Where should logged in user go by default?
|
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
43 |
LOGIN_REDIRECT_URL = '/' |
264
by Holger Rapp
No more direct logging in on the page to prevent CSRF attacks |
44 |
|
1
by Holger Rapp
Initial commit of new widelands homepage |
45 |
# If you set this to False, Django will make some optimizations so as not
|
46 |
# to load the internationalization machinery.
|
|
166
by Holger Rapp
Disabled internationalisation |
47 |
USE_I18N = False |
1
by Holger Rapp
Initial commit of new widelands homepage |
48 |
|
49 |
# Absolute path to the directory that holds media.
|
|
50 |
# Example: "/home/media/media.lawrence.com/"
|
|
512
by franku
some cleanups |
51 |
# Overwritten in local_settings.py
|
1
by Holger Rapp
Initial commit of new widelands homepage |
52 |
MEDIA_ROOT = '' |
53 |
||
54 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
|
55 |
# trailing slash if there is a path component (optional in other cases).
|
|
56 |
# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
|
18
by Holger Rapp
Halfway added the forum. Refactored css & basic layout to get rid of this table madness |
57 |
MEDIA_URL = '/wlmedia/' |
1
by Holger Rapp
Initial commit of new widelands homepage |
58 |
|
519
by franku
addressed code review; fixed an error for links with no texts; fixed loading lightbox_v2 css |
59 |
# Absolute path where static files from thirdparty apps will be collected using
|
509
by franku
adapted to django default static file handling |
60 |
# the command: ./manage.py collectstatic
|
517
by franku
other folder for STATIC_ROOT |
61 |
STATIC_ROOT = os.path.join(BASE_DIR, 'media/static_collected/') |
509
by franku
adapted to django default static file handling |
62 |
|
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/' |
|
67 |
||
1
by Holger Rapp
Initial commit of new widelands homepage |
68 |
# Make this unique, and don't share it with anybody.
|
69 |
SECRET_KEY = '#*bc7*q0-br42fc&6l^x@zzk&(=-#gr!)fn@t30n54n05jkqcu' |
|
70 |
||
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
71 |
ROOT_URLCONF = 'urls' |
72 |
||
404.2.8
by franku
first partially working version with old data |
73 |
# List of finder classes that know how to find static files in
|
74 |
# various locations.
|
|
75 |
STATICFILES_FINDERS = [ |
|
438.1.6
by franku
run the script |
76 |
'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
404.2.8
by franku
first partially working version with old data |
77 |
]
|
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
78 |
|
489.1.11
by franku
tweaks for settings; added setting PASSWORD_HASHERS |
79 |
INSTALLED_APPS = [ |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
80 |
'django.contrib.admin', |
81 |
'django.contrib.auth', |
|
82 |
'django.contrib.contenttypes', |
|
83 |
'django.contrib.sessions', |
|
404.2.8
by franku
first partially working version with old data |
84 |
'django.contrib.messages', |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
85 |
'django.contrib.staticfiles', |
86 |
'django.contrib.sites', |
|
87 |
'django.contrib.humanize', |
|
429.3.12
by franku
merged with trunk and fixed wrong resolving of merge conflict |
88 |
'django.contrib.sitemaps', |
404.2.28
by franku
actualized registration, Added norecaptcha2, but registrations do not work correct yet, small nits |
89 |
'nocaptcha_recaptcha', |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
90 |
|
91 |
# Our own apps
|
|
92 |
'wiki.templatetags.restructuredtext', |
|
93 |
'mainpage', |
|
404.2.8
by franku
first partially working version with old data |
94 |
'wlhelp', |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
95 |
'wlimages', |
96 |
'wlwebchat', |
|
97 |
'wlprofile', |
|
98 |
'wlsearch', |
|
99 |
'wlpoll', |
|
100 |
'wlevents', |
|
489.1.3
by franku
fixed creation of noticetypes -> convert post_syncdb to post_migrate |
101 |
'wlmaps.apps.WlMapsConfig', |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
102 |
'wlscreens', |
103 |
'wlggz', |
|
478.1.1
by gschmitlin at gmail
added scheduling module in a clean way |
104 |
'wlscheduling', |
489.1.6
by franku
run through 1.9 release notes |
105 |
'check_input.apps.CheckInput', |
479.2.21
by franku
save the needed files in the webites code, not in the widelands source code; use a management command to create the documentation |
106 |
'documentation', |
500.1.1
by franku
added an privacy policy app |
107 |
'privacy_policy.apps.PrivacyPolicyConfig', |
462.3.1
by franku
first functioning search with haystack and whoosh; working: wlmaps, pybb.topic, pybb.post |
108 |
'haystack', # search engine; see option HAYSTACK_CONNECTIONS |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
109 |
|
110 |
# Modified 3rd party apps
|
|
489.1.3
by franku
fixed creation of noticetypes -> convert post_syncdb to post_migrate |
111 |
'wiki.apps.WikiConfig', # This is based on wikiapp, but has some local modifications |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
112 |
'news', # This is based on simple-blog, but has some local modifications |
489.1.3
by franku
fixed creation of noticetypes -> convert post_syncdb to post_migrate |
113 |
'pybb.apps.PybbConfig', # Feature enriched version of pybb |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
114 |
|
404.2.32
by franku
patched GunChleocs work on wlhelp into this and adjusted it to django1.8; cleanups |
115 |
# Thirdparty apps
|
438.1.6
by franku
run the script |
116 |
'threadedcomments', # included as wlapp |
404.2.41
by franku
use a more maintained pagination fork; minor corrections |
117 |
'notification', # included as wlapp |
489.1.3
by franku
fixed creation of noticetypes -> convert post_syncdb to post_migrate |
118 |
'django_messages_wl.apps.WLDjangoMessagesConfig', |
489.1.4
by franku
replace unmaintained pagination app; fixes for context_instance, NoArgsCommand and resolve_variable() |
119 |
'dj_pagination', |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
120 |
'tagging', |
502.1.1
by franku
include django_star_ratings |
121 |
'star_ratings', |
489.1.11
by franku
tweaks for settings; added setting PASSWORD_HASHERS |
122 |
]
|
1
by Holger Rapp
Initial commit of new widelands homepage |
123 |
|
489.1.10
by franku
use of new setting MIDDLEWARE instead of MIDDLEWARE_CLASSES |
124 |
MIDDLEWARE = [ |
125 |
'django.middleware.security.SecurityMiddleware', |
|
126 |
'django.contrib.sessions.middleware.SessionMiddleware', |
|
1
by Holger Rapp
Initial commit of new widelands homepage |
127 |
'django.middleware.common.CommonMiddleware', |
242.4.11
by janus
Add CSRF Token MW and move tracking load modul position |
128 |
'django.middleware.csrf.CsrfViewMiddleware', |
1
by Holger Rapp
Initial commit of new widelands homepage |
129 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
489.1.10
by franku
use of new setting MIDDLEWARE instead of MIDDLEWARE_CLASSES |
130 |
'django.contrib.messages.middleware.MessageMiddleware', |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
131 |
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
489.1.10
by franku
use of new setting MIDDLEWARE instead of MIDDLEWARE_CLASSES |
132 |
|
133 |
# Foreign middleware
|
|
489.1.4
by franku
replace unmaintained pagination app; fixes for context_instance, NoArgsCommand and resolve_variable() |
134 |
'dj_pagination.middleware.PaginationMiddleware', |
489.1.18
by franku
replace tracking with a single online_users_middleware |
135 |
'online_users_middleware.OnlineNowMiddleware', |
489.1.10
by franku
use of new setting MIDDLEWARE instead of MIDDLEWARE_CLASSES |
136 |
]
|
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
137 |
|
138 |
TEMPLATES = [ |
|
139 |
{
|
|
140 |
'BACKEND': 'django.template.backends.django.DjangoTemplates', |
|
141 |
'DIRS': [os.path.join(BASE_DIR, 'templates')], |
|
404.2.8
by franku
first partially working version with old data |
142 |
'APP_DIRS': True, |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
143 |
'OPTIONS': { |
144 |
'context_processors': [ |
|
145 |
'django.template.context_processors.debug', |
|
146 |
'django.template.context_processors.request', |
|
147 |
'django.contrib.auth.context_processors.auth', |
|
404.2.7
by franku
updated pip_requirements.text; more conversion on generic views |
148 |
'django.contrib.messages.context_processors.messages', |
404.2.28
by franku
actualized registration, Added norecaptcha2, but registrations do not work correct yet, small nits |
149 |
'django.template.context_processors.i18n', |
150 |
'django.template.context_processors.media', |
|
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
151 |
'django.template.context_processors.static', |
152 |
'django.template.context_processors.tz', |
|
404.2.8
by franku
first partially working version with old data |
153 |
'django_messages.context_processors.inbox', |
497.2.8
by franku
make dleted username configurable, some string fixes |
154 |
'wlprofile.context_processors.deleted_user_data', |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
155 |
],
|
156 |
},
|
|
157 |
},
|
|
158 |
]
|
|
159 |
||
11
by Holger Rapp
Imported wikiapp into our repository, because we did some local changes (users must be logged in to edit wiki pages) |
160 |
############################
|
161 |
# Activation configuration #
|
|
162 |
############################
|
|
6
by Holger Rapp
added missing From Email |
163 |
DEFAULT_FROM_EMAIL = 'noreply@widelands.org' |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
164 |
ACCOUNT_ACTIVATION_DAYS = 2 # Days an activation token keeps active |
5
by Holger Rapp
added registration, hacked on login |
165 |
|
489.1.11
by franku
tweaks for settings; added setting PASSWORD_HASHERS |
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
|
|
168 |
PASSWORD_HASHERS = [ |
|
169 |
'django.contrib.auth.hashers.PBKDF2PasswordHasher', |
|
170 |
'django.contrib.auth.hashers.SHA1PasswordHasher'
|
|
171 |
]
|
|
172 |
||
11
by Holger Rapp
Imported wikiapp into our repository, because we did some local changes (users must be logged in to edit wiki pages) |
173 |
######################
|
174 |
# Wiki configuration #
|
|
175 |
######################
|
|
176 |
WIKI_LOCK_DURATION = 30 |
|
325.1.7
by Shevonar
Login box works now via an iFrame. |
177 |
WIKI_URL_RE = r'[:\-\w ]+' |
325.1.8
by Shevonar
- switched screenshot gallery from lightbox to fancybox |
178 |
WIKI_WORD_RE = r'[:\-\w ]+' |
11
by Holger Rapp
Imported wikiapp into our repository, because we did some local changes (users must be logged in to edit wiki pages) |
179 |
|
21
by Holger Rapp
- Forum is now ready to be used |
180 |
######################
|
181 |
# User configuration #
|
|
182 |
######################
|
|
447.1.1
by franku
cleanup settings.py; removed some commented code; changed NOCOMMs in TODOs |
183 |
DEFAULT_TIME_ZONE = 3 # See wlprofile.templatetags.custom_date |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
184 |
DEFAULT_TIME_DISPLAY = r"%ND(Y-m-d,) H:i" # According to ISO 8601 |
185 |
DEFAULT_MARKUP = 'markdown' |
|
62.1.7
by Holger Rapp
Added support for profiles. No gravatar yet |
186 |
SIGNATURE_MAX_LENGTH = 255 |
187 |
SIGNATURE_MAX_LINES = 8 |
|
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
188 |
AVATARS_UPLOAD_TO = 'profile/avatars' |
254
by Holger Rapp
Fixed a few deprecation warnings and reparied cross site scripting fixes for AJAX requests |
189 |
AVATAR_HEIGHT = AVATAR_WIDTH = 80 |
21
by Holger Rapp
- Forum is now ready to be used |
190 |
|
191 |
######################
|
|
192 |
# Pybb Configuration #
|
|
193 |
######################
|
|
462.3.28
by franku
revert accidentally enabled pybb attachments |
194 |
PYBB_ATTACHMENT_ENABLE = False # disable gzip middleware when enabling attachments |
41
by Holger Rapp
WikiWords in News/Forum Posts, markdown is default markup in forum, bbcode needed to be removed for this to work |
195 |
PYBB_DEFAULT_MARKUP = 'markdown' |
325.1.6
by Shevonar
Fixed bbcode preview and small bug fixes in the forum templates |
196 |
PYBB_FREEZE_FIRST_POST = False |
21
by Holger Rapp
- Forum is now ready to be used |
197 |
|
97
by Holger Rapp
Added smileys to wlmarkdown (wiki,forum,news) |
198 |
##############################################
|
199 |
# Link classification and other Markup stuff #
|
|
200 |
##############################################
|
|
48.1.7
by Holger Rapp
Implemented wishlist bug for colored links |
201 |
LOCAL_DOMAINS = [ |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
202 |
'xoops.widelands.org'
|
48.1.7
by Holger Rapp
Implemented wishlist bug for colored links |
203 |
]
|
404.2.24
by franku
added the old threadedcomments app as wildelands app |
204 |
|
519
by franku
addressed code review; fixed an error for links with no texts; fixed loading lightbox_v2 css |
205 |
SMILEY_DIR = STATIC_URL + 'img/smileys/' |
97
by Holger Rapp
Added smileys to wlmarkdown (wiki,forum,news) |
206 |
# Keep this list ordered by length of smileys
|
207 |
SMILEYS = [ |
|
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
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'), |
|
504.3.21
by franku
change devilish smiley |
220 |
(']:-)', 'face-devilish.png'), |
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
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'), |
|
97
by Holger Rapp
Added smileys to wlmarkdown (wiki,forum,news) |
248 |
]
|
48.1.7
by Holger Rapp
Implemented wishlist bug for colored links |
249 |
|
462.3.1
by franku
first functioning search with haystack and whoosh; working: wlmaps, pybb.topic, pybb.post |
250 |
#################
|
251 |
# Search Config #
|
|
252 |
#################
|
|
253 |
HAYSTACK_CONNECTIONS = { |
|
254 |
'default': { |
|
255 |
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', |
|
256 |
'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'), |
|
257 |
},
|
|
258 |
}
|
|
259 |
||
110
by Holger Rapp
Added new tag for markdown svn:r3222 will be translated into a clickable link to a revision |
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
|
|
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
266 |
WIDELANDS_SVN_DIR = '' |
110
by Holger Rapp
Added new tag for markdown svn:r3222 will be translated into a clickable link to a revision |
267 |
|
147
by Holger Rapp
Added a first version of a screenshot application |
268 |
###############
|
269 |
# Screenshots #
|
|
270 |
###############
|
|
404.2.6
by franku
updated settings.py pip_requirements; first try on polls,news and loginbox; still not woriking at all; so many differences :-D |
271 |
THUMBNAIL_SIZE = (160, 160) |
147
by Holger Rapp
Added a first version of a screenshot application |
272 |
|
325.1.9
by Shevonar
Maps modul reworked and adjusted to new style. |
273 |
########
|
274 |
# Maps #
|
|
275 |
########
|
|
276 |
MAPS_PER_PAGE = 10 |
|
277 |
||
397.2.2
by franku
recipients as name/adress |
278 |
##############################################
|
279 |
## Recipient(s) who get an email if someone ##
|
|
404.2.37
by franku
some corrections |
280 |
## uses the form on legal notice page ##
|
397.2.2
by franku
recipients as name/adress |
281 |
## Use allways the form ('name', 'Email') ##
|
282 |
##############################################
|
|
404.2.7
by franku
updated pip_requirements.text; more conversion on generic views |
283 |
INQUIRY_RECIPIENTS = [ |
404.2.8
by franku
first partially working version with old data |
284 |
('peter', 'peter@example.com'), |
404.2.7
by franku
updated pip_requirements.text; more conversion on generic views |
285 |
]
|
397.2.1
by franku
A legal notice page |
286 |
|
404.2.39
by franku
use bleach as html sanitizer |
287 |
##########################################
|
288 |
## Allowed tags/attributes for 'bleach' ##
|
|
404.2.41
by franku
use a more maintained pagination fork; minor corrections |
289 |
## Used for sanitizing user input. ##
|
404.2.39
by franku
use bleach as html sanitizer |
290 |
##########################################
|
291 |
BLEACH_ALLOWED_TAGS = [u'a', |
|
292 |
u'abbr', |
|
293 |
u'acronym', |
|
294 |
u'blockquote', |
|
295 |
u'br', |
|
404.2.40
by franku
don't bleach tables; bleach threadedcomments |
296 |
u'em', u'i', u'strong', u'b', |
297 |
u'ul', u'ol', u'li', |
|
298 |
u'div', u'p', |
|
299 |
u'h1', u'h2', u'h3', u'h4', u'h5', u'h6', |
|
300 |
u'pre', u'code', |
|
404.2.39
by franku
use bleach as html sanitizer |
301 |
u'img', |
404.2.40
by franku
don't bleach tables; bleach threadedcomments |
302 |
u'hr', |
303 |
u'table', u'tbody', u'thead', u'th', u'tr', u'td', |
|
413.1.1
by franku
reworked http500 error page; redirect /docs to docs/wl |
304 |
u'sup', |
438.1.6
by franku
run the script |
305 |
]
|
404.2.40
by franku
don't bleach tables; bleach threadedcomments |
306 |
|
438.1.6
by franku
run the script |
307 |
BLEACH_ALLOWED_ATTRIBUTES = {'img': ['src', 'alt'], 'a': [ |
308 |
'href'], 'td': ['align'], '*': ['class', 'id', 'title']} |
|
404.2.8
by franku
first partially working version with old data |
309 |
|
489.1.18
by franku
replace tracking with a single online_users_middleware |
310 |
##########################
|
311 |
# Pagination settings #
|
|
312 |
# for dj-pagination #
|
|
313 |
##########################
|
|
468.1.5
by franku
removed pybb pagination; some fiddling ith css |
314 |
PAGINATION_DEFAULT_WINDOW = 2 |
315 |
||
489.1.19
by franku
fix url for django_messages and cleanups |
316 |
###########################
|
317 |
# Settings for displaying #
|
|
318 |
# online users #
|
|
319 |
###########################
|
|
320 |
||
321 |
# Time in seconds how long a user will be shown online
|
|
493.1.3
by franku
reduce time a user is considered online |
322 |
ONLINE_THRESHOLD = 60 * 15 |
489.1.19
by franku
fix url for django_messages and cleanups |
323 |
# Number of stored users
|
489.1.20
by franku
fixed JS user filtering for PMs |
324 |
ONLINE_MAX = 25 |
468.1.5
by franku
removed pybb pagination; some fiddling ith css |
325 |
|
497.2.12
by franku
better use a column in wlprofile to identify a deleted user |
326 |
###########################################
|
327 |
# Settings for users who deleted themself #
|
|
328 |
###########################################
|
|
497.2.8
by franku
make dleted username configurable, some string fixes |
329 |
|
497.2.16
by franku
set email to an empty string |
330 |
DELETED_MAIL_ADDRESS = '' |
497.2.17
by franku
changed deleted username; small css-fix for comments where the username is small |
331 |
DELETED_USERNAME = 'Ex-Member' |
497.2.6
by franku
make deleted email address configurable |
332 |
|
497.3.2
by franku
some modified settings for cookies |
333 |
###################
|
334 |
# Cookie settings #
|
|
335 |
###################
|
|
497.3.3
by franku
set only csrf_cookie_age to none is enough |
336 |
|
497.3.4
by franku
fixed link; fixed showing deleted user when quoting a post |
337 |
# See: https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-age
|
497.3.3
by franku
set only csrf_cookie_age to none is enough |
338 |
CSRF_COOKIE_AGE = None |
497.3.2
by franku
some modified settings for cookies |
339 |
|
502.1.6
by franku
fixed comment |
340 |
#############################
|
341 |
# star_rating configuration #
|
|
342 |
#############################
|
|
502.1.1
by franku
include django_star_ratings |
343 |
|
502.1.3
by franku
to control migrating of votes to new app, show both votes |
344 |
STAR_RATINGS_STAR_HEIGHT = 14 |
345 |
STAR_RATINGS_STAR_WIDTH = 14 |
|
502.1.1
by franku
include django_star_ratings |
346 |
STAR_RATINGS_RANGE = 10 |
347 |
||
1
by Holger Rapp
Initial commit of new widelands homepage |
348 |
try: |
438.1.6
by franku
run the script |
349 |
from local_settings import * |
1
by Holger Rapp
Initial commit of new widelands homepage |
350 |
except ImportError: |
438.1.6
by franku
run the script |
351 |
pass
|