~widelands-dev/widelands-website/trunk

1 by Holger Rapp
Initial commit of new widelands homepage
1
# Django settings for widelands project.
2
3
DEBUG = True
4
TEMPLATE_DEBUG = DEBUG
5
6
ADMINS = (
7
    # ('Your Name', 'your_email@domain.com'),
8
)
9
10
MANAGERS = ADMINS
11
254 by Holger Rapp
Fixed a few deprecation warnings and reparied cross site scripting fixes for AJAX requests
12
DATABASES = {
13
   'default': {
14
      'ENGINE': 'django.db.backends.sqlite3',
15
      'NAME': 'dev.db',
16
      'USER': '',      # Not used with sqlite3.
17
      'PASSWORD': '',  # Not used with sqlite3.
18
      'HOST': '',      # Set to empty string for localhost. Not used with sqlite3.
19
      'PORT': '',      # Set to empty string for default. Not used with sqlite3.
20
   }
21
}
1 by Holger Rapp
Initial commit of new widelands homepage
22
23
# Local time zone for this installation. Choices can be found here:
24
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
25
# although not all choices may be available on all operating systems.
26
# If running in a Windows environment this must be set to the same as your
27
# system time zone.
28
TIME_ZONE = 'Europe/Berlin'
29
30
# Language code for this installation. All choices can be found here:
31
# http://www.i18nguy.com/unicode/language-identifiers.html
32
LANGUAGE_CODE = 'de'
33
34
SITE_ID = 1
35
264 by Holger Rapp
No more direct logging in on the page to prevent CSRF attacks
36
# Where should logged in user go by default?
37
LOGIN_REDIRECT_URL="/"
38
1 by Holger Rapp
Initial commit of new widelands homepage
39
# If you set this to False, Django will make some optimizations so as not
40
# to load the internationalization machinery.
166 by Holger Rapp
Disabled internationalisation
41
USE_I18N = False
1 by Holger Rapp
Initial commit of new widelands homepage
42
43
# Absolute path to the directory that holds media.
44
# Example: "/home/media/media.lawrence.com/"
45
MEDIA_ROOT = ''
46
47
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
48
# trailing slash if there is a path component (optional in other cases).
49
# 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
50
MEDIA_URL = '/wlmedia/'
1 by Holger Rapp
Initial commit of new widelands homepage
51
52
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
53
# trailing slash.
54
# Examples: "http://foo.com/media/", "/media/".
55
ADMIN_MEDIA_PREFIX = '/media/'
56
57
# Make this unique, and don't share it with anybody.
58
SECRET_KEY = '#*bc7*q0-br42fc&6l^x@zzk&(=-#gr!)fn@t30n54n05jkqcu'
59
60
# List of callables that know how to import templates from various sources.
61
TEMPLATE_LOADERS = (
254 by Holger Rapp
Fixed a few deprecation warnings and reparied cross site scripting fixes for AJAX requests
62
    'django.template.loaders.filesystem.Loader',
63
    'django.template.loaders.app_directories.Loader',
1 by Holger Rapp
Initial commit of new widelands homepage
64
#     'django.template.loaders.eggs.load_template_source',
65
)
66
67
MIDDLEWARE_CLASSES = (
28 by Holger Rapp
Added django-messages
68
    # 'simplestats.middleware.RegexLoggingMiddleware',
26 by Holger Rapp
added gzip middleware, added 404 and 500 templates
69
    'django.middleware.gzip.GZipMiddleware', # Remove this, when load gets to high
1 by Holger Rapp
Initial commit of new widelands homepage
70
    'django.middleware.common.CommonMiddleware',
71
    'django.contrib.sessions.middleware.SessionMiddleware',
242.4.11 by janus
Add CSRF Token MW and move tracking load modul position
72
    'django.middleware.csrf.CsrfViewMiddleware',
1 by Holger Rapp
Initial commit of new widelands homepage
73
    'django.contrib.auth.middleware.AuthenticationMiddleware',
5 by Holger Rapp
added registration, hacked on login
74
    'pagination.middleware.PaginationMiddleware',
183 by Holger Rapp
reenabled django tracking
75
    'tracking.middleware.VisitorTrackingMiddleware',
76
    'tracking.middleware.VisitorCleanUpMiddleware',
1 by Holger Rapp
Initial commit of new widelands homepage
77
)
78
79
ROOT_URLCONF = 'widelands.urls'
80
81
TEMPLATE_DIRS = (
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',
86
)
87
5 by Holger Rapp
added registration, hacked on login
88
TEMPLATE_CONTEXT_PROCESSORS = (
254 by Holger Rapp
Fixed a few deprecation warnings and reparied cross site scripting fixes for AJAX requests
89
    "django.contrib.auth.context_processors.auth",
5 by Holger Rapp
added registration, hacked on login
90
    "django.core.context_processors.debug",
91
    "django.core.context_processors.i18n",
92
    "django.core.context_processors.media",
93
    'django.core.context_processors.request',
94
)
95
11 by Holger Rapp
Imported wikiapp into our repository, because we did some local changes (users must be logged in to edit wiki pages)
96
############################
97
# Activation configuration #
98
############################
6 by Holger Rapp
added missing From Email
99
DEFAULT_FROM_EMAIL = 'noreply@widelands.org'
5 by Holger Rapp
added registration, hacked on login
100
ACCOUNT_ACTIVATION_DAYS=2 # Days an activation token keeps active
101
11 by Holger Rapp
Imported wikiapp into our repository, because we did some local changes (users must be logged in to edit wiki pages)
102
######################
103
# Wiki configuration #
104
######################
105
WIKI_LOCK_DURATION = 30
106
21 by Holger Rapp
- Forum is now ready to be used
107
######################
108
# User configuration #
109
######################
62.1.7 by Holger Rapp
Added support for profiles. No gravatar yet
110
AUTH_PROFILE_MODULE = 'wlprofile.Profile'
111
DEFAULT_TIME_ZONE = 3
112
DEFAULT_MARKUP ="markdown"
113
SIGNATURE_MAX_LENGTH = 255
114
SIGNATURE_MAX_LINES = 8
115
AVATARS_UPLOAD_TO = "profile/avatars"
254 by Holger Rapp
Fixed a few deprecation warnings and reparied cross site scripting fixes for AJAX requests
116
AVATAR_HEIGHT = AVATAR_WIDTH = 80
21 by Holger Rapp
- Forum is now ready to be used
117
118
######################
119
# Pybb Configuration #
120
######################
121
PYBB_ATTACHMENT_ENABLE = False
41 by Holger Rapp
WikiWords in News/Forum Posts, markdown is default markup in forum, bbcode needed to be removed for this to work
122
PYBB_DEFAULT_MARKUP = 'markdown'
21 by Holger Rapp
- Forum is now ready to be used
123
97 by Holger Rapp
Added smileys to wlmarkdown (wiki,forum,news)
124
##############################################
125
# Link classification and other Markup stuff #
126
##############################################
48.1.7 by Holger Rapp
Implemented wishlist bug for colored links
127
LOCAL_DOMAINS = [
128
    "xoops.widelands.org"
129
]
97 by Holger Rapp
Added smileys to wlmarkdown (wiki,forum,news)
130
SMILEY_DIR = MEDIA_URL + "img/smileys/"
131
# Keep this list ordered by length of smileys
132
SMILEYS = [
133
    ("O:-)", "face-angel.png"),
134
    (":'-(", "face-crying.png"),
135
    (">:-)", "face-devilish.png"), # Hack around markdown replacement. see also SMILEY_PREESCAPING
136
    (":(|)", "face-monkey.png"),
137
    (":-D", "face-grin.png"),
138
    ("8-)", "face-glasses.png"),
139
    (":-x", "face-kiss.png"),
140
    (":-|", "face-plain.png"),
141
    (":-(", "face-sad.png"),
142
    (":))", "face-smile-big.png"),
143
    (":-)", "face-smile.png"),
144
    (":-O", "face-surprise.png"),
145
    (";-)", "face-wink.png"),
146
    (":D", "face-grin.png"),
147
    (":(", "face-sad.png"),
148
    (":)", "face-smile.png"),
149
    (":O", "face-surprise.png"),
150
    (";)", "face-wink.png"),
151
]
152
# This needs to be done to keep some stuff hidden from markdown
153
SMILEY_PREESCAPING = [
154
    (">:-)", "\>:-)"),
155
]
48.1.7 by Holger Rapp
Implemented wishlist bug for colored links
156
87 by Holger Rapp
First draft version of search using the sphinx search engine
157
###############################
158
# Sphinx (Search prog) Config #
159
###############################
90 by Holger Rapp
Sphinx must now be enabled in local_settings.py, otherwise it won't work
160
USE_SPHINX=False
87 by Holger Rapp
First draft version of search using the sphinx search engine
161
SPHINX_API_VERSION = 0x116
162
92 by Holger Rapp
User tracking is implemented using django-tracking. Yet another dependency
163
############
164
# Tracking #
165
############
109 by Holger Rapp
Increased the tracking timeout, because it doesn't hurt and decreases load
166
TRACKING_CLEANUP_TIMEOUT=48
167
110 by Holger Rapp
Added new tag for markdown svn:r3222 will be translated into a clickable link to a revision
168
###########################
169
# Widelands SVN directory #
170
###########################
171
# This is needed for various thinks, for example
172
# to access media (for minimap creation) or for online help
173
# or for ChangeLog displays
174
WIDELANDS_SVN_DIR=""
175
176
#####################
177
# ChangeLog display #
178
#####################
202 by Holger Rapp
svn:rev has been replaced by bzr:rev
179
BZR_URL = r"http://bazaar.launchpad.net/%%7Ewidelands-dev/widelands/trunk/revision/%s"
92 by Holger Rapp
User tracking is implemented using django-tracking. Yet another dependency
180
147 by Holger Rapp
Added a first version of a screenshot application
181
###############
182
# Screenshots #
183
###############
184
THUMBNAIL_SIZE = ( 160, 160 )
185
1 by Holger Rapp
Initial commit of new widelands homepage
186
INSTALLED_APPS = (
187
    'django.contrib.auth',
188
    'django.contrib.contenttypes',
189
    'django.contrib.sessions',
190
    'django.contrib.sites',
191
    'django.contrib.admin',
5 by Holger Rapp
added registration, hacked on login
192
    'django.contrib.markup',
14 by Holger Rapp
Added notification support for wiki
193
    'django.contrib.humanize',
4 by Holger Rapp
added wlblock tag, refactored main page
194
195
    # TODO: only temporary for webdesign stuff
196
    'django.contrib.webdesign',
197
242.4.11 by janus
Add CSRF Token MW and move tracking load modul position
198
    # Thirdparty apps, but need preload
199
    'tracking',
200
1 by Holger Rapp
Initial commit of new widelands homepage
201
    # Our own apps
202
    'widelands.mainpage',
32 by Holger Rapp
First version of widelands online help
203
    'widelands.online_help',
50 by Holger Rapp
First (working) commit of wlimages app, the app that will handle image uploading and managing. Uploading works now; images can only be uploaded once (with the same filename). Much stil missing.
204
    'widelands.wlimages',
48.4.1 by Holger Rapp
Put dead ugly webchat back on page
205
    'widelands.wlwebchat',
48.1.17 by Holger Rapp
Added recaptcha on registration site
206
    'widelands.wlrecaptcha',
62.1.7 by Holger Rapp
Added support for profiles. No gravatar yet
207
    'widelands.wlprofile',
87 by Holger Rapp
First draft version of search using the sphinx search engine
208
    'widelands.wlsearch',
99 by Holger Rapp
First draft version of wlpoll, a poll application
209
    'widelands.wlpoll',
215 by Holger Rapp
Added a simple events model to display dates on the homepage
210
    'widelands.wlevents',
120 by Holger Rapp
Initital (unusable) version of wlmaps application
211
    'widelands.wlmaps',
147 by Holger Rapp
Added a first version of a screenshot application
212
    'widelands.wlscreens',
209.1.2 by timo
Add wlggz to urls and installed apps
213
    'widelands.wlggz',
17 by Holger Rapp
Main Page contains now the same informations as before
214
215
    # Modified 3rd party apps
11 by Holger Rapp
Imported wikiapp into our repository, because we did some local changes (users must be logged in to edit wiki pages)
216
    'widelands.wiki', # This is based on wikiapp, but has some local modifications
17 by Holger Rapp
Main Page contains now the same informations as before
217
    'widelands.news', # This is based on simple-blog, but has some local modifications
21 by Holger Rapp
- Forum is now ready to be used
218
    'pybb', # Feature enriched version of pybb
1 by Holger Rapp
Initial commit of new widelands homepage
219
220
    # Thirdparty apps
31 by Holger Rapp
Added threadedcomments to news items
221
    'threadedcomments',
206 by Holger Rapp
Fixed the site. There was a number of things broken
222
    'django_messages',
5 by Holger Rapp
added registration, hacked on login
223
    'registration', # User registration (per Email validation)
224
    'pagination',
1 by Holger Rapp
Initial commit of new widelands homepage
225
    'tagging',
31 by Holger Rapp
Added threadedcomments to news items
226
    'notification',
157 by Holger Rapp
Backend for map voting is completed. 'Only' the UI is missing
227
    'djangoratings',
201 by Holger Rapp
Added support for sphinxdoc, a sphinx to django bridge
228
    'sphinxdoc',
256 by Holger Rapp
django-evolutions is dead. Let's use south
229
    'south',
201 by Holger Rapp
Added support for sphinxdoc, a sphinx to django bridge
230
)
1 by Holger Rapp
Initial commit of new widelands homepage
231
232
try:
233
    from local_settings import *
234
except ImportError:
235
    pass
90 by Holger Rapp
Sphinx must now be enabled in local_settings.py, otherwise it won't work
236
237
if USE_SPHINX:
238
    INSTALLED_APPS += (
239
        'djangosphinx',
240
    )