Я запускаю следующий код в качестве приложения GAE.Webapp2 Маршруты в двигателе приложений Google не работают
class HomeHandler(webapp2.RequestHandler):
def get(self):
self.response.write('This is the HomeHandler.')
class ProductListHandler(webapp2.RequestHandler):
def get(self):
self.response.write('This is the ProductListHandler.')
class ProductHandler(webapp2.RequestHandler):
def get(self, product_id):
self.response.write('This is the ProductHandler. '
'The product id is %s' % product_id)
app = webapp2.WSGIApplication([
(r'/', HomeHandler),
(r'/products', ProductListHandler),
(r'/products/(\d+)', ProductHandler),
])
При попытке доступа, только «/» маршрут работает (https://myapp.appspot.com), который печатает 'Это HomeHandler. Если я пытаюсь получить доступ к https://myapp.appspot.com/products, я получаю
Запрошенный URL/продукты не найден на этом сервере
Я новичок в разработке на стороне сервера. Что я делаю не так?