我正在使用带有 python 和 webapp2 的 app-engine 构建我的新网站我很难在我的 web 应用程序中定义 URI
我需要的结果是:
http://www.example.com/
http://www.example.com/products/
http://www.example.com/products/table
我认为这是一项简单的任务,但显然不是(对我来说,无论如何)
当我尝试加载类似的内容时出现 404 错误: http ://www.example.com/products/chair/
我的错误在哪里?
app = webapp2.WSGIApplication([
webapp2.Route('/', MainPage),
webapp2.Route('/products/', handler=MainProductsHandler),
webapp2.Route('/products/(\w+)/', handler=ProductHandler)
],debug=True)