~widelands-dev/widelands-website/trunk

472.1.1 by franku
read local_settings.py as utf-8
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
472.1.2 by franku
spelling
3
# The above leads python2.7 to read this file as utf-8
472.1.1 by franku
read local_settings.py as utf-8
4
# Needs to be directly after the python shebang
5
6
# Treat all strings as unicode
7
from __future__ import unicode_literals
173.3.1 by Holger Rapp
added local sample
8
import os
440.2.2 by janus-jhor
local_settings.py.sample Aufräumen und Erweitern
9
import re
10
508.1.12 by franku
removed superfluos variable
11
# Absolute path for uploaded files, e.g.:
12
# images for avatars, wiki, wlscreens, news cathegories and also mapfiles 
13
MEDIA_ROOT = os.path.join(os.getcwd(), 'media/')
497.3.2 by franku
some modified settings for cookies
14
452.2.2 by franku
adjusted the README.txt; fixed a typo
15
# If you are using the developer version of widelands from Launchpad
452.2.1 by franku
possibility to use binaries from widelands trunk directly
16
# set WIDELANDS_SVN_DIR to the correct path. See also:
17
# https://wl.widelands.org/wiki/BzrPrimer/
325.1.23 by Shevonar
Small fixes, removed old stuff
18
WIDELANDS_SVN_DIR = "/path/to/widelands/trunk/"
479.2.4 by franku
use WIDELANDS_SVN_DIR for serving static html
19
452.2.1 by franku
possibility to use binaries from widelands trunk directly
20
os.environ['PATH'] = WIDELANDS_SVN_DIR + ':' + os.environ['PATH']
173.3.1 by Holger Rapp
added local sample
21
254 by Holger Rapp
Fixed a few deprecation warnings and reparied cross site scripting fixes for AJAX requests
22
DATABASES = {
23
   'default': {
24
      'ENGINE': 'django.db.backends.sqlite3',
25
      'NAME': 'dev.db',
26
      'USER': '',      # Not used with sqlite3.
27
      'PASSWORD': '',  # Not used with sqlite3.
28
      'HOST': '',      # Set to empty string for localhost. Not used with sqlite3.
29
      'PORT': '',      # Set to empty string for default. Not used with sqlite3.
489.1.11 by franku
tweaks for settings; added setting PASSWORD_HASHERS
30
      # Next is only used for mysql. Explanations:
31
      # https://docs.djangoproject.com/en/1.11/ref/databases/#connecting-to-the-database
489.1.22 by franku
forgotten autoesacpes on notification templates; comments and cleanups
32
      # 'init_command': is recommended for MySQL >= 5.6
489.1.11 by franku
tweaks for settings; added setting PASSWORD_HASHERS
33
      # 'OPTIONS': {
489.1.7 by franku
comment for mysql DATABASE option required for mysql >=v5.6
34
      #   'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
489.1.11 by franku
tweaks for settings; added setting PASSWORD_HASHERS
35
      #   'isolation_level': 'read committed',
489.1.7 by franku
comment for mysql DATABASE option required for mysql >=v5.6
36
      #},
37
   }
254 by Holger Rapp
Fixed a few deprecation warnings and reparied cross site scripting fixes for AJAX requests
38
}
173.3.1 by Holger Rapp
added local sample
39
520.2.7 by franku
addressed code review
40
# If you want to test the registration, you will need these keys.
41
# For testing purposes, grab the values from:
520.2.3 by kaputtnik
where to get registration keys for localhost
42
# https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha-v2-what-should-i-do
404.2.48 by franku
moved some settings to local_settings.py.sample
43
NORECAPTCHA_SITE_KEY = 'dummy'
44
NORECAPTCHA_SECRET_KEY = 'dummy'
404.2.55 by franku
added mainpage context_processors
45
46
# The logo used for mainpage
472.5.1 by franku
removed unused images
47
LOGO_FILE = 'logo_alpha.png'
415.2.2 by franku
minor explanataions and additions to local_settings.py.sample
48
49
# Setting an email backend prevents 'connection refused' errors
415.2.3 by franku
fixed missing import; added migration to remove two fields from wlggz_ggzauth
50
# Don't use this on the widelands server!
415.2.2 by franku
minor explanataions and additions to local_settings.py.sample
51
# This Backend shows Emails in console
52
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
53
422.1.12 by franku
fix letest posts; no hidden posts in feeds
54
# Anti spam keywords
55
# If these are found, the posts/topics in forum get hidden
476.1.10 by franku
forgot to adjust local_settings.py.sample
56
ANTI_SPAM_KWRDS = ['spam']
440.2.2 by janus-jhor
local_settings.py.sample Aufräumen und Erweitern
57
ANTI_SPAM_PHONE_NR = re.compile('\d{8,16}')
472.3.1 by franku
Logging out and set user inactive after x hidden posts
58
MAX_HIDDEN_POSTS = 5
422.1.12 by franku
fix letest posts; no hidden posts in feeds
59
493.1.1 by franku
fix for last server error; define a CACHE backend to use another than default
60
#######################
61
#  Optional settings  #
62
#######################
63
64
# Set a Database cache. You won't need this for development or testing locally.
65
# If you want to use this, run ./manage.py createcachetable after uncommenting.
66
# CACHES = {
67
#     'default': {
68
#         'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
69
#         'LOCATION': 'wl_cache',
70
#     }
71
# }
72
415.2.2 by franku
minor explanataions and additions to local_settings.py.sample
73
# Uncomment 'LOGGING = {...}' for debugging purposes when you have set DEBUG=False.
74
# Use then in the code:
75
76
# import logging
77
# log = logging.getLogger(__name__)
78
# log.info('Variable x: %s', x)
79
80
# This prints the value for Variable 'x' to log.txt
81
82
#LOGGING = {
83
#    'version': 1,
84
#    'disable_existing_loggers': False,
85
#    'handlers': {
86
#        'logfile': {
87
#            'level':'DEBUG',
88
#            'class':'logging.FileHandler',
508.1.12 by franku
removed superfluos variable
89
#            'filename': os.getcwd() + "/log.txt",
415.2.2 by franku
minor explanataions and additions to local_settings.py.sample
90
#        },
91
#    },
92
#    'root': {
93
#        'level': 'INFO',
94
#        'handlers': ['logfile']
95
#    },
96
#}