Implement the new task API from django v6

Author: joeyjurjensCreated Nov 20, 2025Updated Sep 12, 2026
Labels★ New featureproposal

Django 6 comes with a new tasks API: https://docs.djangoproject.com/en/dev/topics/tasks/

The task API was initially developed here: https://github.com/RealOrangeOne/django-tasks.

We could add django-tasks as a dependency, so that we can keep support Django versions < 6.0.

As a library maintainer you don't have to do much. You'd just enqueue a possible background job and the TASK_BACKEND setting will handle how it's actually ran.

Currently oscar sends some emails, which could cause errors leaving the database with potential "corrupted" data or unexpected state. It can also be confusing for a customer whether a order has been succesful yes/no.

Most people that use oscar probably have overridden all this functionality, but it'd be nice if oscar has a proper implementation for this which Django now provides as of 6.0 and the django-tasks package already did.

On a side note, when we do this, we can potentially also refactor how the whole mailing logic works. Because with the current implementation, it's actually quite difficult to implement sending mails with a background job because different kind of mails have different kind of dispatchers and then you have different kind of emails.

Ideally, you'd just have a API that sends emails which all the "mailers" use to send an email.

Source: django-oscar/django-oscar