initial commit

This commit is contained in:
2026-03-11 17:12:28 +08:00
commit 5d1e1cb7cb
61 changed files with 2971 additions and 0 deletions

21
clear_migrations.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -e
# Find all directories that contain a migrations folder (Django apps)
while IFS= read -r -d '' dir; do
app_dir="${dir%/migrations}"
app_name="$(basename "$app_dir")"
echo "clean migrations $app_name ..."
find "$dir" -maxdepth 1 -type f -name "*.py" ! -name "__init__.py" -delete
find "$dir" -maxdepth 1 -type f -name "*.pyc" -delete
find "$dir" -maxdepth 1 -type f -name "*.pyc" -delete
find "$dir" -maxdepth 1 -type f -name "*.py~" -delete
find "$dir" -maxdepth 1 -type f -name "*.pyo" -delete
find "$dir" -maxdepth 1 -type f -name "*.swp" -delete
done < <(find . -type d -name migrations -print0)
echo "clear all."
#run
# ./clear_migrations.sh