forked from otm-india/treemapindia.in
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal_settings.py~
executable file
·278 lines (241 loc) · 7.92 KB
/
local_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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
import os
#from choices import *
DATABASES = {
'default': {
'NAME': 'puneotm_dev',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'USER': 'postgres', # Not used with sqlite3.
'PASSWORD': 'green342', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '5432',
}
}
STATIC_URL = '/static/'
FORCE_SCRIPT_NAME = ''
SITE_ROOT = '/'
MEDIA_URL = 'media/'
TILECACHE_URL = "http://49.248.144.117/tilecache/"
TILECACHE_POLYGON_LAYER = "" #"otm/overlay"
TILECACHE_LAYER = "otm"
GEOSERVER_GEO_LAYER = 'otm:tree_search'
GEOSERVER_URL = 'http://49.248.144.117:8081/geoserver/wms'
GEOSERVER_GEO_STYLE = 'polygon'
API_KEY_GOOGLE_ANALYTICS = "IGNORE"
OTM_VERSION="1.3"
SITE_LOCATION = 'Pune'
COMPLETE_ARRAY = ['species','condition','sidewalk_damage','powerline_conflict_potential','canopy_height','canopy_condition','dbh','width','length','type']
REGION_NAME = 'Pune'
PENDING_ON = False
MAP_CLICK_RADIUS = .0015 # in decimal degrees
# PMC+PCMC BBOX 73.531,18.349,74.118,18.828 .. 73.553,18.349,74.118,18.8 73.309,18.148,74.406,18.911
#lat=18.513&lon=73.8355&zoom=10&layers=M">View Larger Map</a></small>
# reprojected:
BOUNDING_BOX = { # WKID 4326
'left': 18.349, #-74.361,#-6.98318,
'bottom': 73.531, #40.459, #49.864635,
'right': 18.828, #-73.51, #1.7689,
'top': 74.118 #40.931, #58.078297
}
#18.4835&lon=73.8565
MAP_CENTER_LAT = 18.5215 #18.513 #18.5885
MAP_CENTER_LON = 73.8395 #73.8355 #73.8245
REPUTATION_SCORES = {
'add tree': 25,
'add plot': 25,
'edit tree': 5,
'edit plot': 5,
'add stewardship': 5,
'remove stewardship': -5,
'edit verified': {
'up': 5,
'down': -10,
'neutral': 1,
},
}
EXTRAPOLATE_WITH_AVERAGE = True
#API_KEY_GOOGLE_MAP = ''
#API_KEY_GOOGLE_ANALYTICS = 'UA-23175691-1'
# pipeline minification settings
PIPELINE = False
PIPELINE_ROOT = os.path.dirname(__file__)
PIPELINE_URL = '/'
PIPELINE_YUI_BINARY = '/usr/bin/yui-compressor'
PIPELINE_YUI_JS_ARGUMENTS = '--nomunge'
PIPELINE_JS = {
'base': {
'source_filenames': (
SITE_ROOT + 'static/js/jquery_mods.js',
SITE_ROOT + 'static/treemap.js',
SITE_ROOT + 'static/js/utils.js',
SITE_ROOT + 'static/js/map.js',
SITE_ROOT + 'static/js/map_init.js',
SITE_ROOT + 'static/js/geocode.js',
SITE_ROOT + 'static/js/page_init.js',
SITE_ROOT + 'static/js/management.js',
SITE_ROOT + 'static/js/comments.js',
),
'output_filename': 'static/all_base.js',
},
'map': {
'source_filenames': (
SITE_ROOT + 'static/js/map.js',
SITE_ROOT + 'static/js/threaded.js',
),
'output_filename': 'static/all_map.js',
}
}
ADMINS = (
('shantanoo', '[email protected]'),
('Johnson', '[email protected]'),
)
MANAGERS = ADMINS
DEFAULT_FROM_EMAIL= '[email protected]'
CONTACT_EMAILS = [DEFAULT_FROM_EMAIL]
EMAIL_MANAGERS = False
TILED_SEARCH_RESPONSE = False
# separate instance of tilecache for dynamic selection tiles
CACHE_SEARCH_TILES = True
CACHE_SEARCH_METHOD = 'disk' #'disk'
CACHE_SEARCH_DISK_PATH = os.path.join(os.path.dirname(__file__), 'local_tiles/')
MAPNIK_STYLESHEET = os.path.join(os.path.dirname(__file__), 'mapserver/stylesheet.xml')
CACHE_BACKEND = 'file:///tmp/trees_cache'
# django-registration
REGISTRATION_OPEN = True # defaults to True
ACCOUNT_ACTIVATION_DAYS = 5
# 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 = 'Asia/Kolkata'
SITE_ID = 1
ROOT_URL = ""
STATIC_ROOT = '/var/www/otm/static'
MEDIA_ROOT = os.path.join(os.path.dirname(__file__), '..', 'media/')
MEDIA_URL = '/media/'
ADMIN_MEDIA_ROOT = os.path.join(os.path.dirname(__file__), '..', 'admin_media/')
ADMIN_MEDIA_PREFIX = '/admin_media/'
STATIC_DATA = os.path.join(os.path.dirname(__file__), '..', 'static/')
# Make this unique, and don't share it with anybody.
SECRET_KEY = '40063b07ecddcb2767ffe199009175e4'
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates'),
# '/usr/local/otm/app/templates'
)
STATICFILES_DIRS = (
'/var/www/otm/OpenTreeMap/static',
)
# required keys are addsame, add, edit and view. Values and order can change. Edit tree_add view to change/add allowed keys
ADD_FORM_TARGETS = [
('addsame', 'I want to add another tree using the same tree details'),
('add', 'I want to add another tree with new details'),
('edit','Let me continue editing this tree'),
('view', 'I\'m done!'),
]
ADD_FORM_TARGETS_DEFAULT = 'view'
CHOICES = {
'alerts': [
("1", "Needs Watering"),
("2", "Needs Pruning"),
("3", "Should be Removed"),
("4", "Pest Or Disease Present"),
("5", "Guard Should Be Removed"),
("6", "Stakes And Ties Should Be Removed"),
("7", "Construction Work In The Area"),
("8", "Touching Wires"),
("9", "Blocking Signs or Traffic Signals"),
("10", "Improperly Pruned or Topped")
],
'actions': [
],
'projects': [
],
'sidewalks': [
("1", "Minor or No Damage"),
("2", "Raised More Than 3/4 Inch")
],
'powerlines': [
("1", "Yes"),
("2", "No"),
("3", "Unknown")
],
'conditions': [
("1", "Dead"),
("2", "Critical"),
("3", "Poor"),
("4", "Fair"),
("5", "Good"),
("6", "Very Good"),
("7", "Excellent")
],
'canopy_conditions': [
("1", "Full - No Gaps"),
("2", "Small Gaps (up to 25% missing)"),
("3", "Moderate Gaps (up to 50% missing)"),
("4", "Large Gaps (up to 75% missing)"),
("5", "Little or None (up to 100% missing)")
],
'plot_types': [
("1", "Well/Pit"),
("2", "Median/Island"),
("3", "Tree Lawn"),
("4", "Park"),
("5", "Planter"),
("6", "Other"),
("7", "Yard"),
("8", "Natural Area")
],
'plot_stewardship': [
("1","Watering"),
("2","Pruning"),
("3","Mulching, Adding Compost or Amending Soil"),
("4","Removing Debris or Trash")
],
'tree_stewardship': [
("1","Enlarging the Planting Area"),
("2","Adding a Guard"),
("3","Removing a Guard"),
("4","Herbaceous Planting")
],
'pests': [
("1", "Fungus rot"),
("2", "Worm rot")
],
'tree_objects': [
("1", "Is found on tree"),
("2", "Not found on tree")
],
'health': [
("1", "Healthy"),
("2", "Diseased"),
("3", "Pest Infected"),
("4", "Dead")
],
'ground_type': [
("1", "Open soil"),
("2", "Compressed soil"),
("3", "Cemented"),
("4", "Tiled"),
("5", "On footpath")
],
"property_type": [
("1", "Residential - private Apartment"),
("2", "Residential - private Bungalow"),
("3", "Residential - private Colony"),
("4", "Residential - private Other"),
("5", "Residential - public Apartment"),
("6", "Residential - public Bungalow"),
("7", "Residential - public Colony"),
("8", "Residential - public Other"),
("9", "Industrial - Estate"),
("10", "Industrial - Plot"),
("11", "Industrial - With divider"),
("12", "Industrial - Without divider"),
("13", "Garden"),
("14", "Waterbody - River bank"),
("15", "Waterbody - Pondside"),
("16", "Waterbody - Lakeside"),
("17", "Waterbody - Drainage"),
("18", "Waterbody - Other")
]
}