PageRenderTime 63ms CodeModel.GetById 32ms RepoModel.GetById 10ms app.codeStats 0ms

/shabti/templates/moinmoin/+package+/config/routing.py_tmpl

https://bitbucket.org/gawel/shabti
Unknown | 29 lines | 22 code | 7 blank | 0 comment | 0 complexity | 64f89600e2137bfac1786bad739b08e3 MD5 | raw file
  1. """Routes configuration
  2. The more specific and detailed routes should be defined first so they
  3. may take precedent over the more generic routes. For more information
  4. refer to the routes manual at http://routes.groovie.org/docs/
  5. """
  6. from routes import Mapper
  7. def make_map(config):
  8. """Create, configure and return the routes Mapper"""
  9. map = Mapper(directory=config['pylons.paths']['controllers'],
  10. always_scan=config['debug'])
  11. map.minimization = False
  12. map.explicit = False
  13. # The ErrorController route (handles 404/500 error pages); it should
  14. # likely stay at the top, ensuring it can always be resolved
  15. map.connect('/error/{action}', controller='error')
  16. map.connect('/error/{action}/{id}', controller='error')
  17. # CUSTOM ROUTES HERE
  18. map.connect('wikipage', '/wiki/{path_info:.*}',
  19. controller='wiki', action='moinpage')
  20. map.connect('/{controller}/{action}')
  21. map.connect('/{controller}/{action}/{id}')
  22. return map