【问题标题】:Bootstrap assets don't load when deployed django on Heroku在 Heroku 上部署 django 时,Bootstrap 资产不加载
【发布时间】:2015-05-27 15:19:42
【问题描述】:

在 Heroku 上部署了我的 django 项目。我使用托管在 maxcdn 上的引导程序。

https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css

在移动版本中一切正常。但是在桌面版本中,页面呈现没有引导资产。在本地服务器上一切正常。 有什么想法吗?

【问题讨论】:

  • 你能把你的项目的网址贴出来吗?
  • 清除浏览器缓存。

标签: django twitter-bootstrap heroku


【解决方案1】:

将 bootstrap.min.css 加载到我的静态文件夹中。现在工作正常。

模板

<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" media="screen, projection"/>

【讨论】:

  • 几个小时后它运行良好,但在推送更新页面后再次显示没有引导样式。
  • 面临同样的问题!
猜你喜欢
  • 2013-10-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-10-17
  • 1970-01-01
  • 1970-01-01
  • 2017-06-24
  • 1970-01-01
相关资源
最近更新 更多