/
settings-dist.py
135 lines (111 loc) · 4 KB
/
settings-dist.py
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Django settings for tuxedo project.
import logging
import os
# Make filepaths relative to settings.
ROOT = os.path.dirname(os.path.abspath(__file__))
path = lambda *a: os.path.join(ROOT, *a)
DEBUG = False
TEMPLATE_DEBUG = DEBUG
LOG_LEVEL = logging.DEBUG
logging.basicConfig()
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'bouncer.db',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
'OPTIONS': {
'init_command': 'SET storage_engine=InnoDB',
'charset': 'utf8',
'use_unicode': True,
},
'TEST_CHARSET': 'utf8',
'TEST_COLLATION': 'utf8_general_ci',
},
# 'slave': {
# ...
# },
}
# Cache Backend. Set up memcache here. Examples:
#CACHE_BACKEND = 'memcached://172.19.26.240:11211;172.19.26.242:11211/'
#CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Los_Angeles'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = False
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = path('media')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = '/media/'
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
STATIC_URL = '/admin-media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '### change me ###'
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
)
# auth backends: uses django first, and converts old Bouncer users as needed
AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',
'users.auth.backend.ConversionBackend')
# user profile stuff
AUTH_PROFILE_MODULE = 'users.UserProfile'
LOGIN_REDIRECT_URL = '/'
ROOT_URLCONF = 'tuxedo.urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
path('templates'))
# path to mozilla product details
PROD_DETAILS_DIR = path('inc', 'product-details', 'json')
INSTALLED_APPS = (
'api',
'mirror',
'geoip',
'lib',
#'php', # enable this if you want to run tests on the bounce script
'users',
'south',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.markup',
'django.contrib.sessions',
#'django.contrib.sites',
)
# the location_check management command can check for stale locations on a
# reference mirror and let you disable the ones that are not present there.
# Define your reference base url here.
REFERENCE_BASEURL = 'http://ftp.mozilla.org/pub/mozilla.org'
# the php app black box tests the bounce script. Set it up at a URL somewhere,
# point it to the same DB, and enter the URL here.
BOUNCER_PHP_URL = ''
# override this with local settings
try:
from local_settings import *
except ImportError, exp:
pass