source: src/django_gheat/website/urls.py@ 9224

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

Answer question of Dennis at http://lijst.wirelessleiden.nl/pipermail/techniek/2011-May/005516.html

File size: 1.2 KB
Line 
1from django.conf.urls.defaults import *
2from django.views.generic.simple import direct_to_template
3from django.views.generic.base import TemplateView
4from django.conf import settings
5
6class HomeView(TemplateView):
7 template_name = 'home.html'
8
9urlpatterns = patterns('',
10 ('^$', HomeView.as_view())
11)
12
13urlpatterns += patterns('website.tile',
14 url(
15 # Example : today/fire/12/3,2.png
16 regex = r'^tile/(?P<zoom>\d+)/(?P<x>\d+),(?P<y>\d+).png$',
17 view = 'serve_tile',
18 name = 'serve_tile',
19 ),
20 )
21
22urlpatterns += patterns('website.osm_proxy',
23 url(
24 # Example : today/fire/12/3,2.png
25 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
31urlpatterns += patterns('website.nodelist',
32 url(
33 regex = r'^nodelist/(?P<zoom>\d+),(?P<lat>[0-9.]+),(?P<lon>[0-9.]+)$',
34 view = 'serve_nodelist',
35 name = 'serve_nodelist',
36 ),
37 )
38
39urlpatterns += patterns('website.filters',
40 url(
41 regex = r'^filter/(?P<ftype>[a-z_]+)$',
42 view = 'serve_filter',
43 name = 'serve_filter',
44 ),
45 url(r'^foofilter/$', 'foo_filter'),
46 )
Note: See TracBrowser for help on using the repository browser.