/
settings.py
159 lines (122 loc) · 4.56 KB
/
settings.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# Django settings for boost_consulting project.
import os
ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
ADMINS = (
('Dave Abrahams', 'dave@boostpro.com'),
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'
MEDIA_URL = '/site-media/'
DEFAULT_FROM_EMAIL = "admin@boostcon.com"
SERVER_EMAIL = "webserver@boostcon.com"
#
# prepare settings that depend on where the project is being run.
#
from site_context import *
TEMPLATE_DEBUG = DEBUG
CACHE_BACKEND = 'locmem:///'
# A default for the view cache, etc.
CACHE_MIDDLEWARE_SECONDS = 60*10
# Local time zone for this installation. All choices can be found here:
# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
TIME_ZONE = 'US/Pacific'
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
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 = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = 'media'
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'gh59=sq@9vj*9dc#n6oflm1^z-_llra(go&hy!n=zy+q8kwq4a'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'utils.context_processors.media_url',
'boost_consulting.accounts.context_processors.account_messages',
# These are Django's defaults. Too bad there's no way to just add to the
# defaults without repeating them.
"django.core.context_processors.auth",
"django.core.context_processors.media",
"django.core.context_processors.debug",
'django.core.context_processors.request',
"django.core.context_processors.i18n",
)
MIDDLEWARE_CLASSES = (
# 'django.middleware.cache.CacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
)
APPEND_SLASH = False
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates".
# Always use forward slashes, even on Windows.
'templates',
os.path.join(os.path.dirname(__file__), 'templates')
)
STOCKPHOTO_URL = '/community/photos'
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.markup',
'boost_consulting.news',
'boost_consulting.pages',
'boost_consulting.conference',
'boost_consulting.accounts',
'boost_consulting.ecommerce',
'boost_consulting.shipping',
'stockphoto',
)
#
# SCT settings
#
SPH_SETTINGS = { 'wiki_rss_url' : '/feeds/community/wiki/',
# 'django096compatibility': True,
'workaround_select_related_bug' : True,
'markdown_top_heading_level' : 3,
'markdown_number_headings' : True,
'community_email_sender' : 'noreply@boostcon.com'
}
LIB_PATH = os.path.join(ROOT_PATH, 'communitytools', 'sphenecoll')
sys.path.append(LIB_PATH)
TEMPLATE_DIRS += ( os.path.join(LIB_PATH, 'templates'),)
TEMPLATE_CONTEXT_PROCESSORS += ( 'sphene.community.context_processors.navigation',)
MIDDLEWARE_CLASSES += (
'sphene.community.middleware.ThreadLocals',
'sphene.community.middleware.GroupMiddleware',
'sphene.community.middleware.MultiHostMiddleware',
'sphene.community.middleware.PermissionDeniedMiddleware',
)
ROOT_URLCONF = 'boost_consulting.urls'
INSTALLED_APPS += (
# 'djaptcha',
'sphene.community',
'sphene.sphboard',
'sphene.sphwiki',
'boost_consulting.communitytools_support',
'django.contrib.humanize',
)
SPH_HOST_MIDDLEWARE_URLCONF_MAP = {
'.*': { 'urlconf': 'boost_consulting.urls',
'params': { 'groupName': 'boostcon' }
},
}
FONT_PATH = '/usr/share/fonts/truetype/ttf-bitstream-vera/VeraBd.ttf'
FONT_SIZE = 16