【发布时间】:2012-10-25 23:38:27
【问题描述】:
我有一个像这样的典型 WSGI 应用程序:
app = webapp2.WSGIApplication([
('/site/path/one', 'package.module.ClassOne'),
('/site/path/two', 'package.module.ClassTwo'),
('/site/path/three', 'package.module.ClassThree'),
])
我希望稍后能够在我的应用程序中检索路由列表,例如在 ClassOne 中:
class ClassOne(webapp2.RequestHandler):
def get(self):
print ''' list of routes (e.g. '/site/path/one', '/site/path/two', etc.) '''
【问题讨论】:
标签: python google-app-engine webapp2