[英]Static dir in app.yaml with space in dir name, how do I handle this?
我有一个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“ components copy_files”
如何在我的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引导程序(由其他人编写)的项目,但是我不想返回他们的代码并编辑所有href,是否有任何快速解决方案可以使这些嵌套的资源文件很好地与gae + app.yaml / webapp2?
多谢您的帮助!!
正确的配置是:
- url: /components%20copy_files
static_dir: templates/components copy_files
- url: /components%20copy_files
static_dir: you can have whatever name you want here(doesn't have to match the url)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.