修改静态文件的更新

This commit is contained in:
2026-01-05 20:19:15 +08:00
parent bdd9b5a6c9
commit 09d9673cb4
2 changed files with 4 additions and 0 deletions

View File

@@ -147,6 +147,9 @@ python manage.py migrate
# 创建超级用户 # 创建超级用户
python manage.py createsuperuser python manage.py createsuperuser
# 收集静态文件重要确保admin页面有CSS样式
python manage.py collectstatic --noinput
``` ```
### 4. 配置Gunicorn ### 4. 配置Gunicorn

View File

@@ -169,3 +169,4 @@ TEMPLATES[0]['DIRS'] = [BASE_DIR / 'templates']
# Static files configuration # Static files configuration
STATICFILES_DIRS = [BASE_DIR / 'static'] STATICFILES_DIRS = [BASE_DIR / 'static']
STATIC_ROOT = BASE_DIR / 'staticfiles'