]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blob - wradmin/config/routing.py
583a50bbd23eb5b46bd556cfa5b57de2b9a2a883
[philipp/winterrodeln/wradmin.git] / wradmin / config / routing.py
1 """Routes configuration
2
3 The more specific and detailed routes should be defined first so they
4 may take precedent over the more generic routes. For more information
5 refer to the routes manual at http://routes.groovie.org/docs/
6
7
8 Proposal for Winterrodeln URL schema:
9
10 bahnen.winterrodeln.org/kemater_alm => www.winterrodeln.org/wiki/Kemater_Alm
11 huetten.winterrodeln.org/kemater_alm => www.winterrodeln.org/wiki/Kemater_Alm_(Gasthaus)
12
13 www.winterrodeln.org/wiki ... handled by apache/mediawiki
14 www.winterrodeln.org/feeds/berichte/alle
15 www.winterrodeln.org/feeds/berichte/region/tirol
16 www.winterrodeln.org/feeds/berichte/bahn/kemater_alm
17 www.winterrodeln.org/wradmin/
18 www.winterrodeln.org/wrapp/
19 www.winterrodeln.org/app/bericht/list
20 www.winterrodeln.org/app/bericht/new
21 www.winterrodeln.org/app/bericht/5360
22 www.winterrodeln.org/app/bericht/5360/edit
23 www.winterrodeln.org/app/bahn/list
24 www.winterrodeln.org/app/bahn/new
25 www.winterrodeln.org/app/bahn/3480
26 www.winterrodeln.org/app/bahn/3480/edit
27 www.winterrodeln.org/app/user
28 www.winterrodeln.org/mobile/
29 www.winterrodeln.org/xml/
30 www.winterrodeln.org/feed/
31
32
33 """
34 from routes import Mapper
35
36 def make_map(config):
37     """Create, configure and return the routes Mapper"""
38     map = Mapper(directory=config['pylons.paths']['controllers'],
39                  always_scan=config['debug'])
40     map.minimization = False
41     map.explicit = False
42
43     # The ErrorController route (handles 404/500 error pages); it should
44     # likely stay at the top, ensuring it can always be resolved
45     map.connect('/error/{action}', controller='error')
46     map.connect('/error/{action}/{id}', controller='error')
47
48     # CUSTOM ROUTES HERE
49
50     map.connect('/', controller='rodelbahn', action='index')
51     map.connect('/{controller}/{action}')
52     map.connect('/{controller}/{action}/{id}')
53
54     return map