forked from widelands/widelands-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
local_settings.py.sample
107 lines (90 loc) · 3.38 KB
/
local_settings.py.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#!/usr/bin/python
# -*- coding: utf-8 -*-
# The above leads python2.7 to read this file as utf-8
# Needs to be directly after the python shebang
import os
import re
# Absolute path for uploaded files, e.g.:
# images for avatars, wiki, wlscreens, news cathegories and also mapfiles
MEDIA_ROOT = os.path.join(os.getcwd(), 'media/')
# If you are using the developer version of widelands from Launchpad
# set WIDELANDS_SVN_DIR to the correct path. See also:
# https://wl.widelands.org/wiki/BzrPrimer/
WIDELANDS_SVN_DIR = "/path/to/widelands/trunk/"
os.environ['PATH'] = WIDELANDS_SVN_DIR + ':' + os.environ['PATH']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'dev.db',
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
# Next is only used for mysql. Explanations:
# https://docs.djangoproject.com/en/1.11/ref/databases/#connecting-to-the-database
# 'init_command': is recommended for MySQL >= 5.6
# 'OPTIONS': {
# 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
# 'isolation_level': 'read committed',
#},
}
}
# If you want to test the registration, you will need these keys.
# For testing purposes, grab the values from:
# https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha-v2-what-should-i-do
NORECAPTCHA_SITE_KEY = 'dummy'
NORECAPTCHA_SECRET_KEY = 'dummy'
# These are used in the contact form to ensure people are human.
INQUIRY_QUESTION = [
('What color is better than green?', 'blue'),
('Type one of these two words: widelands, butter', 'widelands', 'butter'),
]
# if you change this, pls edit the question -> answer
INQUIRY_CHIEFTAINS = [
'Benedikt Straub (Nordfriese) (Since 2022).',
'GunChleoc (2016 – 2022)',
'Holger Rapp (SirVer) (2001 – 2016)',
]
# The logo used for mainpage
LOGO_FILE = 'logo_alpha.png'
# Setting an email backend prevents 'connection refused' errors
# Don't use this on the widelands server!
# This Backend shows Emails in console
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# Anti spam keywords
# If these are found, the posts/topics in forum get hidden
ANTI_SPAM_KWRDS = ['spam']
ANTI_SPAM_PHONE_NR = re.compile('\d{8,16}')
MAX_HIDDEN_POSTS = 5
#######################
# Optional settings #
#######################
# Set a Database cache. You won't need this for development or testing locally.
# If you want to use this, run ./manage.py createcachetable after uncommenting.
# CACHES = {
# 'default': {
# 'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
# 'LOCATION': 'wl_cache',
# }
# }
# Uncomment 'LOGGING = {...}' for debugging purposes when you have set DEBUG=False.
# Use then in the code:
# import logging
# log = logging.getLogger(__name__)
# log.info('Variable x: %s', x)
# This prints the value for Variable 'x' to log.txt
#LOGGING = {
# 'version': 1,
# 'disable_existing_loggers': False,
# 'handlers': {
# 'logfile': {
# 'level':'DEBUG',
# 'class':'logging.FileHandler',
# 'filename': os.getcwd() + "/log.txt",
# },
# },
# 'root': {
# 'level': 'INFO',
# 'handlers': ['logfile']
# },
#}