1 import os
2 os.environ["CELERY_LOADER"] = "django"
3
4
5
6
7
8 APP_NAME = 'Madrona'
9
10 LANGUAGE_CODE = 'en-us'
11 SITE_ID = 1
12 USE_I18N = False
13
14 GEOMETRY_DB_SRID = 3310
15 GEOMETRY_CLIENT_SRID = 4326
16 DISPLAY_LENGTH_UNITS = 'mi'
17 DISPLAY_AREA_UNITS = 'sq_mi'
18
19 GOOGLE_API_KEY = 'ABQIAAAAu2dobIiH7nisivwmaz2gDhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSLaQmJjJuOq03hTEjc-cNV8eegYg'
20
21 from madrona.common import assets
22
23 COMPRESS_CSS = {
24 'application': {
25 'source_filenames': assets.get_css_files(),
26 'output_filename': 'common/css/madrona.r?.css',
27 'extra_context': {
28 'media': 'all'
29 }
30 }
31 }
32
33 COMPRESS_JS = {
34 'application': {
35 'source_filenames': assets.get_js_files(),
36 'output_filename': 'madrona.r?.js'
37 },
38 'tests': {
39 'source_filenames': assets.get_js_test_files(),
40 'output_filename': 'madrona_tests.r?.js'
41 }
42 }
43
44 COMPRESS_VERSION = True
45 COMPRESS_AUTO = True
46
47 GOOGLE_ANALYTICS_MODEL = True
48
49 MIDDLEWARE_CLASSES = (
50
51 'django.middleware.gzip.GZipMiddleware',
52 'django.middleware.common.CommonMiddleware',
53 'madrona.common.middleware.IgnoreCsrfMiddleware',
54 'django.middleware.csrf.CsrfViewMiddleware',
55 'django.contrib.sessions.middleware.SessionMiddleware',
56 'django.contrib.messages.middleware.MessageMiddleware',
57 'django.contrib.auth.middleware.AuthenticationMiddleware',
58
59
60 'django.middleware.transaction.TransactionMiddleware',
61 'madrona.openid.middleware.OpenIDMiddleware',
62 )
63
64 INSTALLED_APPS = (
65 'madrona.common',
66 'django.contrib.auth',
67 'django.contrib.admin',
68 'django.contrib.contenttypes',
69 'django.contrib.sessions',
70 'django.contrib.sites',
71 'django.contrib.gis',
72 'flatblocks',
73 'compress',
74 'madrona.shapes',
75 'madrona.google-analytics',
76 'madrona.layers',
77 'madrona.layer_manager',
78 'madrona.studyregion',
79 'madrona.simplefaq',
80 'madrona.help',
81 'madrona.staticmap',
82 'madrona.screencasts',
83 'madrona.news',
84 'madrona.manipulators',
85 'madrona.kmlapp',
86 'madrona.features',
87 'madrona.user_profile',
88 'madrona.unit_converter',
89 'madrona.openid',
90 'madrona.async',
91 'madrona.loadshp',
92 'madrona.bookmarks',
93 'registration',
94 'south',
95 'djcelery',
96 'djkombu',
97
98
99
100
101
102
103 )
104
105 EXCLUDE_FROM_TESTS = [
106 'south',
107 'registration',
108 'flatblocks',
109 'django.contrib.auth',
110 'django.contrib.admin',
111 'django.contrib.contenttypes',
112 'django.contrib.sessions',
113 'django.contrib.sites',
114 'django.contrib.gis'
115 ]
116
117 ACCOUNT_ACTIVATION_DAYS = 7
118 REGISTRATION_OPEN = True
119 GROUP_REQUEST_EMAIL = None
120 GROUP_REGISTERED_BY_WEB = 'registered_by_web'
121
122 MEDIA_ROOT = os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + '/../../media/')
123
124
125 MEDIA_URL = '/media/'
126 LOGIN_URL = '/accounts/signin/'
127 STATIC_URL = '/media/'
128
129
130 KML_SIMPLIFY_TOLERANCE = 20
131 KML_SIMPLIFY_TOLERANCE_DEGREES = 0.0002
132 KML_EXTRUDE_HEIGHT = 100
133 KML_ALTITUDEMODE_DEFAULT = 'absolute'
134
135
136 SHARING_TO_PUBLIC_GROUPS = ['Share with Public']
137 SHARING_TO_STAFF_GROUPS = ['Share with Staff']
138
139
140 TEMPLATE_CONTEXT_PROCESSORS = (
141 "django.contrib.auth.context_processors.auth",
142 "django.core.context_processors.debug",
143 "django.core.context_processors.i18n",
144 "django.core.context_processors.media",
145 "django.contrib.messages.context_processors.messages",
146 'django.core.context_processors.request',
147 'madrona.openid.context_processors.authopenid',
148 )
149 TEMPLATE_LOADERS = (
150 'django.template.loaders.filesystem.Loader',
151 'django.template.loaders.app_directories.Loader',
152 )
153
154 ADMINS = (
155
156 )
157 MANAGERS = ADMINS
158
159 DEBUG = True
160 TEMPLATE_DEBUG = DEBUG
161
162
163 SCREENCASTS = 'screencasts/'
164 SCREENCAST_IMAGES = 'screencasts/images'
165 VIDEO_PLAYER = MEDIA_URL + 'screencasts/video_player/player-viral.swf'
166
167
168 USER_DATA_ROOT = '/mnt/EBS_userdatalayers/display'
169
170 SKIP_SOUTH_TESTS = True
171 SOUTH_TESTS_MIGRATE = False
172
173
174 CARROT_BACKEND = "django"
175 CELERY_RESULT_BACKEND = "database"
176 CELERY_TRACK_STARTED = True
177 BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
178
179
180 import djcelery
181 djcelery.setup_loader()
182
183
184 ASYNC_IS_DISABLED = False
185
186 AWS_USE_S3_MEDIA = False
187
188
189 OPENID_ENABLED = False
190
191 LOG_FILE = None
192
193 PRIVATE_KML_ROOT = '/mnt/EBS_superoverlays/display'
194
195 DATABASES = {
196 'default': {
197 'ENGINE': 'django.contrib.gis.db.backends.postgis',
198 'NAME': 'example',
199 'USER': 'postgres',
200 }
201 }
202
203
204
205
206 WSGI_USER = None
207
208 CACHES = {
209 'default': {
210
211
212 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
213 }
214 }
215
216 HELP_EMAIL = 'help@madrona.org'
217
218 STATICMAP_AUTOZOOM = True
219
220 TITLES = {
221 'self': 'View',
222 }
223
224
225 BOOKMARK_FEATURE = False
226 BOOKMARK_ANON_USERNAME = "anonymous_bookmark_user"
227 from datetime import timedelta
228 BOOKMARK_ANON_LIMIT = (100, timedelta(minutes=30))
229
230 ENFORCE_SUPPORTED_BROWSER = True
231
232 STARSPAN_BIN = 'starspan'
233 STARSPAN_REMOVE_TMP = True
234
235 POSTGIS_TEMPLATE = 'template1'
236
237 LAUNCH_PAGE = False
238 from django.core.urlresolvers import reverse_lazy
239 LOGIN_REDIRECT_URL = reverse_lazy('map')
240
241 GEOJSON_DOWNLOAD = True
242 GEOJSON_SRID = None
243