1

有没有办法制作一个谷歌应用引擎处理程序来处理所有未指定的网址?

也许像:

app = webapp2.WSGIApplication([
    ('/', MainHandler),
    ('/hello',HelloHandler),
    ('/bye',ByeHandler),
    ('for-everything-else',OtherHandler)
], debug=True) 
4

1 回答 1

2

好的,我自己找到了答案:

app = webapp2.WSGIApplication([
    ('/', MainHandler),
    ('/hello',HelloHandler),
    ('/bye',ByeHandler),    
    ('/.*',OtherHandler)
], debug=True)
于 2013-09-28T07:34:17.497 回答