- Timestamp:
- Aug 16, 2012, 9:00:50 PM (12 years ago)
- Location:
- src/django_gheat
- Files:
-
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/admin.py
r9819 r11406 4 4 class AccesspointAdmin(admin.ModelAdmin): 5 5 list_display = ['ssid','type', 'mac', 'organization'] 6 search_fields = ['ssid', 'mac', 'organization ']6 search_fields = ['ssid', 'mac', 'organization__name'] 7 7 ordering = ['ssid'] 8 8 admin.site.register(Accesspoint, AccesspointAdmin) -
src/django_gheat/gheat/dataimport/__init__.py
r9819 r11406 64 64 global organizations 65 65 if not organizations: 66 organizations = dict(Organization.objects.all().values_list('name','id'))66 organizations = dict(Organization.objects.all().values_list('name','id')) 67 67 68 68 name = Organization.get_name_by_ssid(ssid) 69 if not name:70 return 'NULL'69 if not organizations.has_key(name): 70 return None 71 71 else: 72 return int(organizations[name])72 return str(organizations[name]) 73 73 74 74 -
src/django_gheat/httpd/maps.conf
r10615 r11406 1 1 <VirtualHost *:80> 2 ServerAdmin techniek@lijst.wirelessleiden.nl3 2 DocumentRoot /var/empty 4 ServerName maps.wirelessleiden.nl5 ServerAlias a. maps.wirelessleiden.nl b.maps.wirelessleiden.nl c.maps.wirelessleiden.nl d.maps.wirelessleiden.nl e.maps.wirelessleiden.nl f.maps.wirelessleiden.nl3 ServerName wleiden.maps.vanderzwet.net 4 ServerAlias a.wleiden.maps.vanderzwet.net b.wleiden.maps.vanderzwet.net c.wleiden.maps.vanderzwet.net d.wleiden.maps.vanderzwet.net e.wleiden.maps.vanderzwet.net f.wleiden.maps.vanderzwet.net 6 5 7 ErrorLog /var/log/httpd/n l.wirelessleiden.maps-error.log8 CustomLog /var/log/httpd/n l.wirelessleiden.maps-access.log common6 ErrorLog /var/log/httpd/net.vanderzwet.maps.wleiden-error.log 7 CustomLog /var/log/httpd/net.vanderzwet.maps.wleiden-access.log common 9 8 10 9 <Directory /var/empty> -
src/django_gheat/httpd/tile.conf
r11400 r11406 1 1 <VirtualHost *:80> 2 ServerAdmin techniek@lijst.wirelessleiden.nl2 ServerAdmin info@rickvanderzwet.nl 3 3 DocumentRoot /var/empty 4 ServerName osmproxy.wirelessleiden.nl5 ServerAlias a. osmproxy.wirelessleiden.nl b.osmproxy.wirelessleiden.nl c.osmproxy.wirelessleiden.nl d.osmproxy.wirelessleiden.nl e.osmproxy.wirelessleiden.nl f.osmproxy.wirelessleiden.nl4 ServerName tile.vanderzwet.net 5 ServerAlias a.tile.vanderzwet.net b.tile.vanderzwet.net c.tile.vanderzwet.net d.tile.vanderzwet.net e.tile.vanderzwet.net f.tile.vanderzwet.net 6 6 7 ErrorLog /var/log/httpd/n l.wirelessleiden.osmproxy-error.log8 CustomLog /var/log/httpd/n l.wirelessleiden.osmproxy-access.log common7 ErrorLog /var/log/httpd/net.vanderzwet.tile-error.log 8 CustomLog /var/log/httpd/net.vanderzwet.tile-access.log common 9 9 10 10 <Directory /var/empty> … … 22 22 Allow from all 23 23 </Location> 24 ProxyPassMatch ^/ osm-tile-proxy/(\d{1,2}/\d{1,6}/\d{1,6}\.png)$ balancer://osmcluster/$1 lbmethod=byrequests25 CacheEnable disk / osm-tile-proxy/24 ProxyPassMatch ^/(\d{1,2}/\d{1,6}/\d{1,6}\.png)$ balancer://osmcluster/$1 lbmethod=byrequests 25 CacheEnable disk / 26 26 27 27 # 1 week 28 28 CacheDefaultExpire 604800 29 CacheRoot "/usr/local/var/httpd/cache/ osmproxy"29 CacheRoot "/usr/local/var/httpd/cache/tile" 30 30 CacheDirLevels 2 31 31 CacheDirLength 1 -
src/django_gheat/settings.py
r10924 r11406 12 12 13 13 DJANGO_BALANCERS = OSM_PROXY_BALANCERS = ['a','b','c','d','e','f'] 14 OSM_PROXY_CDN_DOMAINS = [d + '. osmproxy.wirelessleiden.nl' for d in DJANGO_BALANCERS]14 OSM_PROXY_CDN_DOMAINS = [d + '.tile.vanderzwet.net' for d in DJANGO_BALANCERS] 15 15 OSM_PROXY_CDN_DOMAINS_PROTOCOL = 'http://' 16 OSM_PREFIX = '/ osm-tile-proxy'17 DJANGO_CDN_DOMAINS = [d + '. maps.wirelessleiden.nl' for d in DJANGO_BALANCERS]16 OSM_PREFIX = '/' 17 DJANGO_CDN_DOMAINS = [d + '.wleiden.maps.vanderzwet.net' for d in DJANGO_BALANCERS] 18 18 DJANGO_CDN_DOMAINS_PROTOCOL = 'http://' 19 19 … … 37 37 'NAME': 'project_heatmap', 38 38 'USER': 'root', 39 'PASSWORD': ' ',39 'PASSWORD': 'R00tj3!', 40 40 'HOST': 'localhost', 41 41 'PORT': '3306', … … 45 45 CACHES = { 46 46 'default': { 47 'BACKEND': 'django.core.cache.backends. memcached.MemcachedCache',48 'LOCATION': '127.0.0.1:11211',47 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', 48 'LOCATION': OSM_PROXY_DIR, 49 49 'TIMEOUT': 3600 * 24 * 7, 50 50 'OPTIONS': { -
src/django_gheat/urls.py
r9749 r11406 21 21 ) 22 22 23 urlpatterns += patterns('wlheatmap.osm_proxy', 24 url( 25 # Example : today/fire/12/3,2.png 26 regex = r'^osm-proxy/(?P<zoom>\d+)/(?P<x>\d+)[,/](?P<y>\d+).png$', 27 view = 'osm_proxy', 28 name = 'osm_proxy', 29 ), 30 ) 23 if settings.DEBUG: 24 urlpatterns += patterns('wlheatmap.osm_proxy', 25 url( 26 # Example : today/fire/12/3,2.png 27 regex = r'^osm-tile-proxy/(?P<zoom>\d+)/(?P<x>\d+)[,/](?P<y>\d+).png$', 28 view = 'osm_proxy', 29 name = 'osm_proxy', 30 ), 31 ) 31 32 32 33 if settings.DEBUG:34 33 urlpatterns += staticfiles_urlpatterns() 35 34 urlpatterns += patterns('',
Note:
See TracChangeset
for help on using the changeset viewer.