1. cherrypy
  2. CherryPy

Commits

Sylvain Hellegouarch  committed 3b3509b

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

  • Participants
  • Parent commits 89926eb
  • Branches default

Comments (0)

Files changed (1)

File cherrypy/_cpdispatch.py

View file
 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):