Install and configure django-tasks
masterInstall the package via pip:
python -m pip install django-tasksAdd django_tasks to your INSTALLED_APPS in settings.py:
INSTALLED_APPS = [
# ...
"django_tasks",
]Configure a backend in your TASKS setting. If omitted, it defaults to ImmediateBackend. Available built-in backends include:
django_tasks.backends.immediate.ImmediateBackend: Executes the task immediately in the current thread.django_tasks.backends.dummy.DummyBackend: Does not execute tasks, only stores them (useful for testing).
Note: Prior to version 0.12.0, database and RQ backends were included via separate packages (django-tasks-db and django-tasks-rq).
INSTALLED_APPS = [
# ...
"django_tasks",
]
TASKS = {
"default": {
"BACKEND": "django_tasks.backends.immediate.ImmediateBackend"
}
}