【发布时间】:2012-08-25 00:22:58
【问题描述】:
我有一个 GAE + webapp2 应用程序,我的 html 中的 href 行出现此错误,
INFO 2012-08-25 00:08:47,461 dev_appserver.py:2891] "GET /components%20copy_files/bootstrap-typeahead.js HTTP/1.1" 404 -
INFO 2012-08-25 00:08:47,470 dev_appserver.py:2891] "GET /components%20copy_files/application.js HTTP/1.1" 404 -
(我有一堆但是..)
问题是我的 html 引用了这个文件夹的 css/js “组件副本文件”
如何在我的 app.yaml 中映射它?我试过了
- url: /components%20copy_files
static_dir: templates/components%20copy_files
和
- url: /components copy_files
static_dir: templates/components copy_files
和
- url: /components\%20copy_files
static_dir: templates/components\%20copy_files
但我无法让我的网站加载其 css/js...?提前感谢您的帮助。
另外作为后续问题,如果我从不同的托管服务器移植 html/css/js 并且所有 href 链接和目录都已就位,我如何让 app.yaml/webapp2 路由到所有这些文件..我是否必须在我的 app.yaml 中声明每个静态目录?顺便说一句:我正在移植一个使用 twitter bootstrap(由其他人编写)的项目,但我不想通过他们的代码返回并编辑所有 href,是否有任何快速解决方案可以让这些嵌套资源文件很好地与gae+app.yaml/webapp2?
如果您能提供帮助,非常感谢!
【问题讨论】: