admin & data: correct admin action redirect, add SQLite retry, seed_test_data command

This commit is contained in:
2026-08-26 03:22:20 +03:30
parent f322d27e4f
commit 05ab6ffc36
7 changed files with 601 additions and 10 deletions

View File

@@ -127,6 +127,13 @@ DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
# timeout بالاتر از پیش‌فرض: وقتی دو کانکشنِ هم‌زمان (مثلِ تستِ
# concurrency واقعیِ campaigns) به قفلِ نوشتنِ SQLite برخورد
# می‌کنن، این باعث می‌شه کانکشنِ منتظر تا ۲۰ ثانیه صبر کنه به‌جای
# اینکه فوراً OperationalError('database table is locked') بده.
'OPTIONS': {
'timeout': 20,
},
}
}