This document describes the current stable version of Celery (5.6). For development docs, go here.

# `celery.contrib.django.task`

Added in version 5.4.

## API Reference

class celery.contrib.django.task.DjangoTask

  Extend the base `Task` for Django.

  Provide a nicer API to trigger tasks at the end of the DB transaction.

  apply_async_on_commit(*args, **kwargs) → None

    Call `apply_async()` with Django’s `on_commit()`.

  delay_on_commit(*args, **kwargs) → None

    Call `delay()` with Django’s `on_commit()`.