谷歌应用引擎模块的路由不工作

2024-03-29 10:22:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个用Python编写的演示应用程序,运行在googleappengine上。此应用程序有3个模块。我添加了一个配置文件来配置模块的路由,但它不起作用。此文件名为调度.yaml看起来像这样:

application: dotted-lexicon-638

dispatch:
  - url: "dotted-lexicon-638.appspot.com/"
    module: default

  - url: "dotted-lexicon-638.appspot.com/list*"
    module: list

  - url: "dotted-lexicon-638.appspot.com/logs*"
    module: logs

我部署这个文件使用“应用程序.py更新“调度项目”命令

如果您转到“http://list.dotted-lexicon-638.appspot.com”和“http://logs.dotted-lexicon-638.appspot.com” 您可以看到这两个模块都在工作。你知道吗

我错过什么了吗?你知道吗


Tags: 模块com应用程序httpurl路由配置文件调度
1条回答
网友
1楼 · 发布于 2024-03-29 10:22:26

当您使用路径进行模块路由时,并不意味着路径映射到模块的根,它只是确定哪个模块有机会处理请求。除非列表模块handling/list中有代码,否则它将是404。你知道吗

相关问题 更多 >