2
# -*- coding: utf-8 -*-
3
# The above leads python2.7 to read this file as utf-8
4
# Needs to be directly after the python shebang
6
# Treat all strings as unicode
7
from __future__ import unicode_literals
11
# Base path for content uploaded by users, like avatars, maps or images
12
# Better make this a static path
13
USER_MEDIA_BASE_PATH = os.getcwd()
15
# Absolute path where to store files uploaded by users
16
MEDIA_ROOT = os.path.join(USER_MEDIA_BASE_PATH, 'media/')
18
# If you are using the developer version of widelands from Launchpad
19
# set WIDELANDS_SVN_DIR to the correct path. See also:
20
# https://wl.widelands.org/wiki/BzrPrimer/
21
WIDELANDS_SVN_DIR = "/path/to/widelands/trunk/"
23
os.environ['PATH'] = WIDELANDS_SVN_DIR + ':' + os.environ['PATH']
27
'ENGINE': 'django.db.backends.sqlite3',
29
'USER': '', # Not used with sqlite3.
30
'PASSWORD': '', # Not used with sqlite3.
31
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
32
'PORT': '', # Set to empty string for default. Not used with sqlite3.
33
# Next is only used for mysql. Explanations:
34
# https://docs.djangoproject.com/en/1.11/ref/databases/#connecting-to-the-database
35
# 'init_command': is recommended for MySQL >= 5.6
37
# 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
38
# 'isolation_level': 'read committed',
43
# The following are just dummy values, but needed defined
44
# To use the registration you have to create an API key pair
45
# See https://developers.google.com/recaptcha/docs/start
46
# You have to use 'localhost' as Domain
47
NORECAPTCHA_SITE_KEY = 'dummy'
48
NORECAPTCHA_SECRET_KEY = 'dummy'
50
# The logo used for mainpage
51
LOGO_FILE = 'logo_alpha.png'
53
# Setting an email backend prevents 'connection refused' errors
54
# Don't use this on the widelands server!
55
# This Backend shows Emails in console
56
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
59
# If these are found, the posts/topics in forum get hidden
60
ANTI_SPAM_KWRDS = ['spam']
61
ANTI_SPAM_PHONE_NR = re.compile('\d{8,16}')
64
#######################
66
#######################
68
# Set a Database cache. You won't need this for development or testing locally.
69
# If you want to use this, run ./manage.py createcachetable after uncommenting.
72
# 'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
73
# 'LOCATION': 'wl_cache',
77
# Uncomment 'LOGGING = {...}' for debugging purposes when you have set DEBUG=False.
78
# Use then in the code:
81
# log = logging.getLogger(__name__)
82
# log.info('Variable x: %s', x)
84
# This prints the value for Variable 'x' to log.txt
88
# 'disable_existing_loggers': False,
92
# 'class':'logging.FileHandler',
93
# 'filename': USER_MEDIA_BASE_PATH + "/log.txt",
98
# 'handlers': ['logfile']