Features: 1) Add --clear option to collectstatic commands in Unix and Windows scripts for efficient static file cleanup;

Fixes: None;

Extra: None;
This commit is contained in:
Egor Pavlovich Gorbunov 2025-07-01 14:18:26 +03:00
parent f9620ed339
commit e8f2b75de7
4 changed files with 4 additions and 4 deletions

View file

@ -16,7 +16,7 @@ docker compose exec app poetry run python manage.py migrate --no-input --verbosi
echo "Migrations applied successfully!" echo "Migrations applied successfully!"
echo "Collecting static files..." echo "Collecting static files..."
docker compose exec app poetry run python manage.py collectstatic --no-input --verbosity 0 docker compose exec app poetry run python manage.py collectstatic --clear --no-input --verbosity 0
echo "Static files collected successfully!" echo "Static files collected successfully!"
echo "Setting default caches..." echo "Setting default caches..."

View file

@ -22,7 +22,7 @@ docker compose exec app poetry run python manage.py migrate --no-input
echo "Migrations applied successfully!" echo "Migrations applied successfully!"
echo "Collecting static files…" echo "Collecting static files…"
docker compose exec app poetry run python manage.py collectstatic --no-input docker compose exec app poetry run python manage.py collectstatic --clear --no-input
echo "Static files collected successfully!" echo "Static files collected successfully!"
echo "Setting default caches…" echo "Setting default caches…"

View file

@ -17,7 +17,7 @@ docker compose exec app poetry run python manage.py migrate --no-input --verbosi
Write-Host "Migrations applied successfully!" -ForegroundColor Green Write-Host "Migrations applied successfully!" -ForegroundColor Green
Write-Host "Collecting static files..." -ForegroundColor Magenta Write-Host "Collecting static files..." -ForegroundColor Magenta
docker compose exec app poetry run python manage.py collectstatic --no-input --verbosity 0 docker compose exec app poetry run python manage.py collectstatic --clear --no-input --verbosity 0
Write-Host "Static files collected successfully!" -ForegroundColor Green Write-Host "Static files collected successfully!" -ForegroundColor Green
Write-Host "Setting default caches..." -ForegroundColor Magenta Write-Host "Setting default caches..." -ForegroundColor Magenta

View file

@ -36,7 +36,7 @@ docker compose exec app poetry run python manage.py migrate --no-input
Write-Host "Migrations applied successfully!" -ForegroundColor Green Write-Host "Migrations applied successfully!" -ForegroundColor Green
Write-Host "Collecting static files..." -ForegroundColor Magenta Write-Host "Collecting static files..." -ForegroundColor Magenta
docker compose exec app poetry run python manage.py collectstatic --no-input docker compose exec app poetry run python manage.py collectstatic --clear --no-input
Write-Host "Static files collected successfully!" -ForegroundColor Green Write-Host "Static files collected successfully!" -ForegroundColor Green
Write-Host "Setting default caches..." -ForegroundColor Magenta Write-Host "Setting default caches..." -ForegroundColor Magenta