From 38420abda6243d4233d37961727abf4f1f6b8d95 Mon Sep 17 00:00:00 2001 From: Aldo Mateli Date: Sun, 26 May 2024 21:11:03 +0100 Subject: [PATCH] Use initialize_container in django integration --- wireup/integration/django/apps.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wireup/integration/django/apps.py b/wireup/integration/django/apps.py index f533b9a..cfa08b7 100644 --- a/wireup/integration/django/apps.py +++ b/wireup/integration/django/apps.py @@ -6,7 +6,7 @@ from django.apps import AppConfig from django.conf import settings -from wireup import container, warmup_container +from wireup import container, initialize_container if TYPE_CHECKING: from wireup.integration.django import WireupSettings @@ -24,7 +24,9 @@ def ready(self) -> None: # noqa: D102 if not entry.startswith("__") and hasattr(settings, entry): container.params.put(entry, getattr(settings, entry)) - warmup_container( + initialize_container( container, - [importlib.import_module(m) if isinstance(m, str) else m for m in integration_settings.service_modules], + service_modules=[ + importlib.import_module(m) if isinstance(m, str) else m for m in integration_settings.service_modules + ], )