source: src/django_gheat/urls.py@ 9641

Last change on this file since 9641 was 9633, checked in by rick, 13 years ago

Start building framework for direct import of files.

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