Skip to content

Django Global Scanner

Latest

Choose a tag to compare

@tylersuehr7 tylersuehr7 released this 08 May 02:37
acf1f6e

Introduces AutowiredDjangoConfig — a single AppConfig users add to INSTALLED_APPS that reads settings.DJANGO_AUTOWIRED and bootstraps the container for the entire project. Eliminates per-app apps.py boilerplate and is the preferred path for projects with many domain apps.

  • Three discovery modes: explicit PACKAGES, AUTODISCOVER_PREFIX (filters INSTALLED_APPS by namespace), and AUTODISCOVER_SUBPACKAGE (appends e.g. "adapters" and silently skips apps that don't yet follow the convention, enabling incremental migration in a large codebase).
  • EXTRA_MODULES accepted as "module.path:attr" strings, resolved post Django-ready.
  • STRICT flag plumbed through container.initialize() and scan_packages() so import errors fail fast in CI rather than logging warnings.
  • Mutex validation (PACKAGES + AUTODISCOVER_PREFIX raises) and an explicit error if neither is set.
  • New examples/django_autodiscover_demo/ — a "shop" project with two bounded contexts, cross-app DI (orders depends on users), a @provides feature flag, and a real Django request round-trip test.
  • Docs reorganized: project-wide auto-discovery is now the leading section in the Django integration guide, with per-app config demoted to a secondary pattern. Adds a Spring Boot mental-model mapping table.