Skip to content

Commit 361409e

Browse files
committed
Add django_tasks app and configure tasks backends
django_tasks provides the database migrations needed for the DatabaseBackend
1 parent 3ee3889 commit 361409e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

manage_breast_screening/config/settings.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ def list_env(key):
7575
"django.contrib.staticfiles",
7676
"django_extensions",
7777
"django_linear_migrations",
78+
"django_tasks",
79+
"django_tasks.backends.database",
7880
"manage_breast_screening.core",
7981
"manage_breast_screening.auth",
8082
"manage_breast_screening.users",
@@ -233,6 +235,15 @@ def list_env(key):
233235
"dicom": dicom_storage_options,
234236
}
235237

238+
TASKS = {
239+
"default": {
240+
"BACKEND": "django.tasks.backends.immediate.ImmediateBackend",
241+
},
242+
"database": {
243+
"BACKEND": "django_tasks.backends.database.DatabaseBackend",
244+
},
245+
}
246+
236247
# Password validation
237248
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
238249

0 commit comments

Comments
 (0)