Пример #1
0
  def __init__(self, handlers,include_module_in_url=True, include_package_in_url=True, debug=False):
    self.handlers = handlers
    self.handlerMap = get_controllers(CONTROLLERS_DIR, include_module=include_module_in_url, include_package=include_package_in_url)
    self.mapper = Mapper(self.handlerMap.keys())
    self.mapper.extend(handlers)
    """Initializes this application with the given URL mapping.

    Args:
      url_mapping: list of (URI regular expression, RequestHandler) pairs
                   (e.g., [('/', ReqHan)])
      debug: if true, we send Python stack traces to the browser on errors
    """
    self.__debug = debug
    
    WSGIApplication.app = self
    self.current_request_args = ()
Пример #2
0
 def setUpClass(cls):
   cls.mapper = Mapper(get_controllers(CONTROLLERS_DIR)) 
   cls.mapper.extend(webapphandlers)