2012-08-25 2 views
0

나는 GAE +의 webapp2 응용 프로그램을 가지고 내가 dir 이름에 공백이있는 app.yaml의 정적 디렉토리는 어떻게 처리합니까?

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에서 HREF 라인이 오류가

문제는 내 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 링크와 dir이 배치됩니다. app.yaml/webapp2를 사용하여 모든 경로로 연결하는 방법 files .. 내 app.yaml에있는 모든 정적 디렉토리를 선언해야합니까? btw : (누군가 다른 사람이 쓴) 트위터 부트 스트랩을 사용하는 proj를 포팅하는 중이지만 모든 hrefs를 수정하고 코드를 통해 돌아가고 싶지는 않습니다.이 중첩 된 리소스 파일을 멋지게 재생할 수있는 빠른 솔루션이 있습니까? gae + app.yaml/webapp2?

도움을 주시면 감사하겠습니다.

답변

1

오른쪽 구성은이다 : 일

- url: /components%20copy_files 
    static_dir: templates/components copy_files 
+0

감사합니다! – user772401

1
- url: /components%20copy_files 
    static_dir: you can have whatever name you want here(doesn't have to match the url)