01 2017 档案
摘要:# Now search regexp routes # ROUTES_REGEXP是一个字典,键是请求方法,值是[路由, 处理函数]的列表 # 例如:{"GET", [[路由1, 处理函数1], [路由2, 处理函数2]]} routes = ROUTES_REGEXP.get(method,[]) for i in xrange(len(routes)): match = route...
阅读全文
摘要:# Routing def compile_route(route): """ Compiles a route string and returns a precompiled RegexObject. Routes may contain regular expressions with named groups to support url parameters. ...
阅读全文