用户工具

站点工具


django:package:whitenoise

whitenoise

whitenoise:静态文件管理

安装

Bash
  1. uv add whitenoise

配置

基础配置

Bash
  1. STATIC_URL = "static/"
  2. STATIC_ROOT = BASE_DIR / "staticfiles"

Storage

Bash
  1. STORAGES = {
  2. # ...
  3. "staticfiles": {
  4. "BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
  5. },
  6. }
/storage/data/pages/django/package/whitenoise.txt · 最后更改: bestony

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki