Django Fixups - Integration with Django.

class faust.fixups.django.Fixup(app: AppT)[source]

Django fixup.

This fixup is enabled if

  1. the DJANGO_SETTINGS_MODULE environment variable is set,

  2. the https://pypi.org/project/django/ package is installed.

Once enabled it will modify the following features:

  • Autodiscovery

    If faust.App(autodiscovery=True), the Django fixup will automatically autodiscover agents/tasks/web views, and so on found in installed Django apps.

  • Setup

    The Django machinery will be set up when Faust commands are executed.

enabled() bool[source]

Return True if Django is used in this environment.

Return type:


wait_for_django() None[source]
Return type:


autodiscover_modules() Iterable[str][source]

Return list of additional autodiscover modules.

For Django we run autodiscovery in all packages listed in the INSTALLED_APPS setting (with support for custom app configurations).

Return type:


on_worker_init() None[source]

Initialize Django before worker/CLI command starts.

Return type:



Return the Django app registry.


Return the Django settings object.