【问题标题】:Show images/css using GAE with Django使用 GAE 和 Django 显示图像/css
【发布时间】:2011-08-17 20:29:22
【问题描述】:

我对 css 文件和图像在我的项目中的曝光感到困惑。有很多使用 django 的示例,或者我找不到适合组合案例的东西。如果有人可以提供帮助,我将不胜感激。

【问题讨论】:

标签: css django image google-app-engine


【解决方案1】:
  1. 我在 app.yaml 中使用变量 static_dirstatic_files

    - url: /static

        static_dir: static
    

    - url: /stylesheets/main.css

        static_files: stylesheets/main.css 
    
  2. 您可以使用的另一种方法是将图片上传到 blobstore 并从那里提供服务。

【讨论】:

    猜你喜欢
    • 2013-01-17
    • 2020-11-03
    • 2023-04-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多