Google App Engine模块的路由无效

时间:2014-07-11 17:24:14

标签: python google-app-engine

我有一个用Python编写并在Google App Engine上运行的演示应用程序。这个程序有3个模块。我添加了一个配置文件来配置模块的路由但它无法正常工作。这个名为dispatch.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

我使用" appcfg.py update_dispatch project_dir"部署了此文件。命令

如果你去" http://list.dotted-lexicon-638.appspot.com"和" http://logs.dotted-lexicon-638.appspot.com" 你可以看到两个模块都在工作。

我错过了什么吗?

1 个答案:

答案 0 :(得分:1)

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