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
3
bd = os.getcwd() # Better make this a static path
5
TEMPLATE_DIRS = bd + '/templates'
6
STATIC_MEDIA_PATH = bd + '/media'
7
MEDIA_ROOT = bd + '/media/'
8
WIDELANDS_SVN_DIR = "/Users/sirver/Desktop/Programming/cpp/widelands/svn_trunk/"
9
# Absolute path for uploaded files, e.g.:
10
# images for avatars, wiki, wlscreens, news cathegories and also mapfiles
11
MEDIA_ROOT = os.path.join(os.getcwd(), 'media/')
13
# If you are using the developer version of widelands from Launchpad
14
# set WIDELANDS_SVN_DIR to the correct path. See also:
15
# https://wl.widelands.org/wiki/BzrPrimer/
16
WIDELANDS_SVN_DIR = "/path/to/widelands/trunk/"
18
os.environ['PATH'] = WIDELANDS_SVN_DIR + ':' + os.environ['PATH']
15
25
'PASSWORD': '', # Not used with sqlite3.
16
26
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
17
27
'PORT': '', # Set to empty string for default. Not used with sqlite3.
28
# Next is only used for mysql. Explanations:
29
# https://docs.djangoproject.com/en/1.11/ref/databases/#connecting-to-the-database
30
# 'init_command': is recommended for MySQL >= 5.6
32
# 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
33
# 'isolation_level': 'read committed',
38
# If you want to test the registration, you will need these keys.
39
# For testing purposes, grab the values from:
40
# https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha-v2-what-should-i-do
41
NORECAPTCHA_SITE_KEY = 'dummy'
42
NORECAPTCHA_SECRET_KEY = 'dummy'
44
# The logo used for mainpage
45
LOGO_FILE = 'logo_alpha.png'
47
# Setting an email backend prevents 'connection refused' errors
48
# Don't use this on the widelands server!
49
# This Backend shows Emails in console
50
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
53
# If these are found, the posts/topics in forum get hidden
54
ANTI_SPAM_KWRDS = ['spam']
55
ANTI_SPAM_PHONE_NR = re.compile('\d{8,16}')
58
#######################
60
#######################
62
# Set a Database cache. You won't need this for development or testing locally.
63
# If you want to use this, run ./manage.py createcachetable after uncommenting.
66
# 'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
67
# 'LOCATION': 'wl_cache',
71
# Uncomment 'LOGGING = {...}' for debugging purposes when you have set DEBUG=False.
72
# Use then in the code:
75
# log = logging.getLogger(__name__)
76
# log.info('Variable x: %s', x)
78
# This prints the value for Variable 'x' to log.txt
82
# 'disable_existing_loggers': False,
86
# 'class':'logging.FileHandler',
87
# 'filename': os.getcwd() + "/log.txt",
92
# 'handlers': ['logfile']