~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to local_settings.py.sample

  • Committer: Holger Rapp
  • Date: 2009-02-21 18:24:02 UTC
  • Revision ID: sirver@kallisto.local-20090221182402-k3tuf5c4gjwslbjf
Main Page contains now the same informations as before

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
 
 
6
 
# Treat all strings as unicode
7
 
from __future__ import unicode_literals
8
 
import os
9
 
import re
10
 
 
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()
14
 
 
15
 
# Absolute path where to store files uploaded by users
16
 
MEDIA_ROOT = os.path.join(USER_MEDIA_BASE_PATH, 'media/')
17
 
 
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/"
22
 
 
23
 
os.environ['PATH'] = WIDELANDS_SVN_DIR + ':' + os.environ['PATH']
24
 
 
25
 
DATABASES = {
26
 
   'default': {
27
 
      'ENGINE': 'django.db.backends.sqlite3',
28
 
      'NAME': 'dev.db',
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
36
 
      # 'OPTIONS': {
37
 
      #   'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
38
 
      #   'isolation_level': 'read committed',
39
 
      #},
40
 
   }
41
 
}
42
 
 
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'
49
 
 
50
 
# The logo used for mainpage
51
 
LOGO_FILE = 'logo_alpha.png'
52
 
 
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'
57
 
 
58
 
# Anti spam keywords
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}')
62
 
MAX_HIDDEN_POSTS = 5
63
 
 
64
 
#######################
65
 
#  Optional settings  #
66
 
#######################
67
 
 
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.
70
 
# CACHES = {
71
 
#     'default': {
72
 
#         'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
73
 
#         'LOCATION': 'wl_cache',
74
 
#     }
75
 
# }
76
 
 
77
 
# Uncomment 'LOGGING = {...}' for debugging purposes when you have set DEBUG=False.
78
 
# Use then in the code:
79
 
 
80
 
# import logging
81
 
# log = logging.getLogger(__name__)
82
 
# log.info('Variable x: %s', x)
83
 
 
84
 
# This prints the value for Variable 'x' to log.txt
85
 
 
86
 
#LOGGING = {
87
 
#    'version': 1,
88
 
#    'disable_existing_loggers': False,
89
 
#    'handlers': {
90
 
#        'logfile': {
91
 
#            'level':'DEBUG',
92
 
#            'class':'logging.FileHandler',
93
 
#            'filename': USER_MEDIA_BASE_PATH + "/log.txt",
94
 
#        },
95
 
#    },
96
 
#    'root': {
97
 
#        'level': 'INFO',
98
 
#        'handlers': ['logfile']
99
 
#    },
100
 
#}