]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blob - wradmin/wradmin/config/routing.py
7c5953384abf670e950a387bf8c906f08185e3f0
[philipp/winterrodeln/wradmin.git] / wradmin / 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
19
20 """
21 from routes import Mapper
22
23 def make_map(config):
24     """Create, configure and return the routes Mapper"""
25     map = Mapper(directory=config['pylons.paths']['controllers'],
26                  always_scan=config['debug'])
27     map.minimization = False
28     map.explicit = False
29
30     # The ErrorController route (handles 404/500 error pages); it should
31     # likely stay at the top, ensuring it can always be resolved
32     map.connect('/error/{action}', controller='error')
33     map.connect('/error/{action}/{id}', controller='error')
34
35     # CUSTOM ROUTES HERE
36
37     map.connect('/', controller='rodelbahn', action='index')
38     map.connect('/{controller}/{action}')
39     map.connect('/{controller}/{action}/{id}')
40
41     return map