[9139] | 1 | from django.conf.urls.defaults import *
|
---|
| 2 | from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
---|
[9397] | 3 | from django.views.decorators.cache import cache_page
|
---|
| 4 | from django.views.generic.simple import redirect_to, direct_to_template
|
---|
[9139] | 5 |
|
---|
| 6 | # Uncomment the next two lines to enable the admin:
|
---|
| 7 | from django.contrib import admin
|
---|
[9388] | 8 | from django.conf import settings
|
---|
[9139] | 9 | admin.autodiscover()
|
---|
| 10 |
|
---|
[9386] | 11 |
|
---|
[9139] | 12 | urlpatterns = patterns('',
|
---|
| 13 | # Example:
|
---|
[9397] | 14 | (r'^robots.txt$', cache_page(60 * 15)(direct_to_template), {'template' : 'robots.txt', 'mimetype' : 'text/plain'}),
|
---|
[9376] | 15 | (r'^$', redirect_to, { 'url' : 'wlheatmap/', 'permanent' : False }),
|
---|
| 16 | (r'^wlheatmap/', include('wlheatmap.urls')),
|
---|
[9139] | 17 | (r'^gheat/', include('gheat.urls')),
|
---|
| 18 | (r'^admin/', include(admin.site.urls)),
|
---|
| 19 | )
|
---|
[9358] | 20 |
|
---|
[9376] | 21 | urlpatterns += patterns('wlheatmap.osm_proxy',
|
---|
[9358] | 22 | url(
|
---|
| 23 | # Example : today/fire/12/3,2.png
|
---|
[9547] | 24 | regex = r'^osm-proxy/(?P<zoom>\d+)/(?P<x>\d+)[,/](?P<y>\d+).png$',
|
---|
[9358] | 25 | view = 'osm_proxy',
|
---|
| 26 | name = 'osm_proxy',
|
---|
| 27 | ),
|
---|
| 28 | )
|
---|
| 29 |
|
---|
[9633] | 30 |
|
---|
[9388] | 31 | if settings.DEBUG:
|
---|
[9386] | 32 | urlpatterns += staticfiles_urlpatterns()
|
---|
[9633] | 33 | urlpatterns += patterns('',
|
---|
| 34 | url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
|
---|
| 35 | 'document_root': settings.MEDIA_ROOT,
|
---|
| 36 | }))
|
---|