Django Production - 每次都收集静态?

标签 django mod-wsgi production-environment django-staticfiles

我正在使用 WSGI 和 Apache 运行 Django 生产服务器。
我想知道我是否必须运行 collectstatic每次我修改一个小的静态文件。
有没有办法让 WSGI 或任何程序自动化这个过程?

最佳答案

我用 fabric自动化部署,作为步骤之一,我只运行 collectstatic。

关于Django Production - 每次都收集静态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7873968/

相关文章:

python - to_python() 永远不会被调用(即使在 __metaclass__ = models.SubfieldBase 的情况下)

django - 如何使用 allauth 和 rest-auth 从 React 前端在 Django 中重新发送确认电子邮件

javascript - Rails 5 - Google map - Javascript 错误 - initMap 不是函数 - 修复一个 js 问题会产生另一个问题

nginx - 为 Daphne 配置 Supervisor(Django channel )

node.js - Nodejs、PM2 和 nginx 部署安全性?

python - aggregate(Max ('id' )) 返回异常 'str' 对象没有属性 'email'

python - 使用 Mod_WSGI 和 Bottle 在 python 脚本初始化时只加载一次文件

python-2.7 - 我的 Apache WSGI Flask 网络应用程序无法导入其内部 python 模块

python-2.7 - 当正确版本在 python 发行版中时,为什么 wsgi 在/lib64 中寻找库

Python 在新实例中缓存以前的对象属性