Changeset 9358
- Timestamp:
- Jul 7, 2011, 7:23:54 AM (13 years ago)
- Location:
- src/django_gheat
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/settings.py
r9236 r9358 28 28 'NAME': 'project_heatmap', 29 29 'USER': 'root', 30 'PASSWORD': ' password',30 'PASSWORD': '', 31 31 'HOST': 'localhost', 32 32 'PORT': '3306', … … 85 85 # in apps' "static/" subdirectories and in STATICFILES_DIRS. 86 86 # Example: "/home/media/media.lawrence.com/static/" 87 STATIC_ROOT = ' '87 STATIC_ROOT = 'sitestatic' 88 88 89 89 # URL prefix for static files. … … 98 98 # Additional locations of static files 99 99 STATICFILES_DIRS = ( 100 PROJECT_HOME + '/static',100 # PROJECT_HOME + '/static', 101 101 # Put strings here, like "/home/html/static" or "C:/www/django/static". 102 102 # Always use forward slashes, even on Windows. … … 124 124 MIDDLEWARE_CLASSES = ( 125 125 'django.middleware.cache.UpdateCacheMiddleware', 126 #'django.middleware.common.CommonMiddleware',127 #'django.middleware.cache.FetchFromCacheMiddleware',128 #'django.middleware.http.ConditionalGetMiddleware',126 'django.middleware.common.CommonMiddleware', 127 'django.middleware.cache.FetchFromCacheMiddleware', 128 'django.middleware.http.ConditionalGetMiddleware', 129 129 'django.contrib.sessions.middleware.SessionMiddleware', 130 130 'django.contrib.auth.middleware.AuthenticationMiddleware', … … 146 146 'django.contrib.sessions', 147 147 'django.contrib.sites', 148 'django.contrib.staticfiles', 148 149 'django_extensions', 149 150 'gheat', -
src/django_gheat/urls.py
r9139 r9358 12 12 (r'^admin/', include(admin.site.urls)), 13 13 ) 14 15 urlpatterns += patterns('website.osm_proxy', 16 url( 17 # Example : today/fire/12/3,2.png 18 regex = r'^osm-proxy/(?P<zoom>\d+)/(?P<x>\d+),(?P<y>\d+).png$', 19 view = 'osm_proxy', 20 name = 'osm_proxy', 21 ), 22 ) 23 14 24 urlpatterns += staticfiles_urlpatterns() 15 25 -
src/django_gheat/website/static/OpenStreetMap.js
r9302 r9358 45 45 initialize: function(name, options) { 46 46 var url = [ 47 "/website/osm-proxy/${z}/${x},${y}.png", 47 "http://a.osmproxy.wirelessleiden.nl/heatmap/osm-proxy/${z}/${x},${y}.png", 48 "http://b.osmproxy.wirelessleiden.nl/heatmap/osm-proxy/${z}/${x},${y}.png", 49 "http://c.osmproxy.wirelessleiden.nl/heatmap/osm-proxy/${z}/${x},${y}.png", 48 50 ]; 49 51 options = OpenLayers.Util.extend({ numZoomLevels: 19 }, options); … … 161 163 initialize: function(name, options) { 162 164 var url = [ 163 " /website/tile/${z}/${x},${y}.png?colour=90,90,90"165 "tile/${z}/${x},${y}.png?colour=90,90,90" 164 166 ]; 165 167 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); … … 177 179 initialize: function(name, options) { 178 180 var url = [ 179 " /website/tile/${z}/${x},${y}.png?colour=255,0,0&accespoint__ssid__icontains=WirelessLeiden"181 "tile/${z}/${x},${y}.png?colour=255,0,0&accespoint__ssid__icontains=WirelessLeiden" 180 182 ]; 181 183 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); … … 193 195 initialize: function(name, options) { 194 196 var url = [ 195 " /website/tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=0&signaal__lte=100"197 "tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=0&signaal__lte=100" 196 198 ]; 197 199 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); -
src/django_gheat/website/static/heatmap_extensions.js
r9347 r9358 4 4 */ 5 5 function getNodeList(zoomlevel, mousepos){ 6 $.getJSON(" /website/nodelist/" + zoomlevel + "," + mousepos.lat + "," + mousepos.lon,6 $.getJSON("nodelist/" + zoomlevel + "," + mousepos.lat + "," + mousepos.lon, 7 7 function(json){ 8 8 content = 'Wireless Leiden nodes on mouseposition:<br /><b>'; … … 68 68 stop: function(event, sig){ 69 69 signallayer = map.getLayersByName('signallayer'); 70 signallayer[0].setUrl(" /website/tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=" + sig.values[0] + "&signaal__lte=" + sig.values[1]);70 signallayer[0].setUrl("tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=" + sig.values[0] + "&signaal__lte=" + sig.values[1]); 71 71 signallayer[0].redraw(); 72 72 }, … … 169 169 * http://stackoverflow.com/questions/170986/what-is-the-best-way-to-add-options-to-a-select-from-an-array-with-jquery 170 170 */ 171 $.getJSON(" /website/filters/",171 $.getJSON("filters/", 172 172 function(json) { 173 173 $.each(json, function(i,json){ … … 203 203 initialize: function(name, options) { 204 204 var url = [ 205 " /website/tile/${z}/${x},${y}.png?&colour=" + colour + "&meetrondje__gebruiker__naam=" + user205 "tile/${z}/${x},${y}.png?&colour=" + colour + "&meetrondje__gebruiker__naam=" + user 206 206 ]; 207 207 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); … … 240 240 initialize: function(name, options) { 241 241 var url = [ 242 " /website/tile/${z}/${x},${y}.png?&colour=" + colour + "&accespoint__ssid=" + node242 "tile/${z}/${x},${y}.png?&colour=" + colour + "&accespoint__ssid=" + node 243 243 ]; 244 244 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); … … 326 326 initialize: function(name, options) { 327 327 var url = [ 328 " /website/tile/${z}/${x},${y}.png?&colour=" + colour + user + dataset + wlnode + start_date + end_date328 "tile/${z}/${x},${y}.png?&colour=" + colour + user + dataset + wlnode + start_date + end_date 329 329 ]; 330 330 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); -
src/django_gheat/website/templates/home.html
r9347 r9358 1 1 <html> 2 2 <head> 3 <link href="{{ STATIC_URL }}style.css" rel="stylesheet" type="text/css" media="screen" />3 <link type="text/css" href="{{ STATIC_URL }}style.css" rel="stylesheet" /> 4 4 <link type="text/css" href="{{ STATIC_URL }}jquery-ui-1.8.13.custom.css" rel="Stylesheet" /> 5 5 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}jquery-1.6.1.min.js"></script> -
src/django_gheat/website/urls.py
r9244 r9358 20 20 ) 21 21 22 urlpatterns += patterns('website.osm_proxy',23 url(24 # Example : today/fire/12/3,2.png25 regex = r'^osm-proxy/(?P<zoom>\d+)/(?P<x>\d+),(?P<y>\d+).png$',26 view = 'osm_proxy',27 name = 'osm_proxy',28 ),29 )30 31 22 urlpatterns += patterns('website.nodelist', 32 23 url(
Note:
See TracChangeset
for help on using the changeset viewer.