~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to local_settings.py.sample

  • Committer: Holger Rapp
  • Date: 2019-06-21 18:34:42 UTC
  • mfrom: (540.1.3 update_ops_script)
  • Revision ID: sirver@gmx.de-20190621183442-y2ulybzr0rdvfefd
Adapt the update script for the new server.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
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
 
5
 
1
6
import os
2
 
bd = "/some/path"
3
 
bd = os.getcwd() # Better make this a static path
4
 
 
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/"
 
7
import re
 
8
 
 
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/')
 
12
 
 
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/"
 
17
 
 
18
os.environ['PATH'] = WIDELANDS_SVN_DIR + ':' + os.environ['PATH']
9
19
 
10
20
DATABASES = {
11
21
   'default': {
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
 
31
      # 'OPTIONS': {
 
32
      #   'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
 
33
      #   'isolation_level': 'read committed',
 
34
      #},
18
35
   }
19
36
}
20
37
 
21
 
 
22
 
 
 
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'
 
43
 
 
44
# The logo used for mainpage
 
45
LOGO_FILE = 'logo_alpha.png'
 
46
 
 
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'
 
51
 
 
52
# Anti spam keywords
 
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}')
 
56
MAX_HIDDEN_POSTS = 5
 
57
 
 
58
#######################
 
59
#  Optional settings  #
 
60
#######################
 
61
 
 
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.
 
64
# CACHES = {
 
65
#     'default': {
 
66
#         'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
 
67
#         'LOCATION': 'wl_cache',
 
68
#     }
 
69
# }
 
70
 
 
71
# Uncomment 'LOGGING = {...}' for debugging purposes when you have set DEBUG=False.
 
72
# Use then in the code:
 
73
 
 
74
# import logging
 
75
# log = logging.getLogger(__name__)
 
76
# log.info('Variable x: %s', x)
 
77
 
 
78
# This prints the value for Variable 'x' to log.txt
 
79
 
 
80
#LOGGING = {
 
81
#    'version': 1,
 
82
#    'disable_existing_loggers': False,
 
83
#    'handlers': {
 
84
#        'logfile': {
 
85
#            'level':'DEBUG',
 
86
#            'class':'logging.FileHandler',
 
87
#            'filename': os.getcwd() + "/log.txt",
 
88
#        },
 
89
#    },
 
90
#    'root': {
 
91
#        'level': 'INFO',
 
92
#        'handlers': ['logfile']
 
93
#    },
 
94
#}