我的应用程序应该接受这样的URI:
/poll/abc-123
/poll/abc-123/
/poll/abc-123/vote/ # post new vote
/poll/abc-123/vote/456 # view/update a vote
Run Code Online (Sandbox Code Playgroud)
民意调查可以选择组织成类别,因此上述所有内容也应该如下:
/mycategory/poll/abc-123
/mycategory/poll/abc-123/
/mycategory/poll/abc-123/vote/
/mycategory/poll/abc-123/vote/456
Run Code Online (Sandbox Code Playgroud)
我的配置错误:
app = webapp2.WSGIApplication([
webapp2.Route('/<category>/poll/<poll_id><:/?>', PollHandler),
webapp2.Route('/<category>/poll/<poll_id>/vote/<vote_id>', VoteHandler),
], debug=True)
Run Code Online (Sandbox Code Playgroud)
问题:如何修复配置?
如果可能,应针对GAE CPU时间/托管费进行优化.例如,如果我为每个条目添加两行可能会更快:一行包含类别,另一行没有类别...