Commits

Sylvain Hellegouarch committed 3b3509b

Making it easier to pass routes mapper options through the RoutesDispatcher, for issues such as #1010 or #1047

Comments (0)

Files changed (1)

cherrypy/_cpdispatch.py

 class RoutesDispatcher(object):
     """A Routes based dispatcher for CherryPy."""
 
-    def __init__(self, full_result=False):
+    def __init__(self, full_result=False, **mapper_options):
         """
         Routes dispatcher
 
         import routes
         self.full_result = full_result
         self.controllers = {}
-        self.mapper = routes.Mapper()
+        self.mapper = routes.Mapper(**mapper_options)
         self.mapper.controller_scan = self.controllers.keys
 
     def connect(self, name, route, controller, **kwargs):