【问题标题】:Static files not working on GAE静态文件在 GAE 上不起作用
【发布时间】:2013-07-27 06:58:24
【问题描述】:

我正在使用以下 yaml 配置:

      application: xxxxxxxx
      version: 1
      runtime: python27
      api_version: 1
      threadsafe: true

      handlers:
      - url: /bootstrap
        static_dir: static/bootstrap

      - url: /fonts
        static_dir: static/fonts

      - url: /js
        static_dir: static/js

      - url: /images
        static_dir: static/images

      - url: /css
        static_dir: static/css

      - url: /favicon\.ico
        static_files: ./static/favicon.ico
        upload: ./static/favicon\.ico

      - url: /.*
        script: main.app

      libraries:
      - name: django
        version: "1.3"

而我的文件夹结构是这样的:

    \
    ....static
    ..........bootstrap
    ...................css
    ...................js
    ...................img
    ..........css
    ..........fonts
    ..........images
    ..........js

在开发环境中它工作正常(使用可用的最新版本),但是当我部署应用程序时它没有。我知道文件名在 gae 上区分大小写,但我已经检查过了。

还有什么问题?

请帮忙。

谢谢

【问题讨论】:

标签: python google-app-engine yaml static-files


【解决方案1】:

这似乎很愚蠢,但从 GAE 启动器中删除项目并重新添加并重新部署它解决了问题。

【讨论】:

    猜你喜欢
    • 2014-03-25
    • 2021-03-05
    • 2023-04-08
    • 2016-08-20
    • 2012-08-16
    • 1970-01-01
    • 2012-01-14
    • 1970-01-01
    • 2016-08-12
    相关资源
    最近更新 更多