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... 阅读全文
posted @ 2017-01-26 11:14 鸪斑兔 阅读(245) 评论(0) 推荐(0) 编辑
摘要:# 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. ... 阅读全文
posted @ 2017-01-25 17:35 鸪斑兔 阅读(562) 评论(0) 推荐(0) 编辑