且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

静态文件更改未反映在投放的样式表中

更新时间:2023-02-12 10:11:22

这里有几件事可能会给您带来麻烦.

There are a couple things here that could be giving you issues.

  1. 您的浏览器正在缓存样式表.要禁用此缓存,您可以打开开发人员工具,进入网络"标签,然后点击禁用缓存".(在 Firefox 将所有CSS 收集到一个文件中,然后即可提供该文件.
  1. Your browser is caching the stylesheets. To disable this caching, you can open your developer tools, go the network tab, and click "Disable cache" (in Firefox or Chrome, at least).
  2. Your project is configured to serve the collected files. To fix this, run ./manage.py collectstatic - this will collect all your CSS into a single file, which can then be served.