freezing-fall-2672
09/05/2023, 9:33 AMdjango.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
when loading required apps via conftest.py hook ...
right now I'm rather confused about this since apps are correctly declared in settings at runtime ... 🤔 any hints? 🙏early-umbrella-56089
09/05/2023, 10:06 AMfreezing-fall-2672
09/05/2023, 10:59 AMfreezing-fall-2672
09/05/2023, 11:02 AMfreezing-fall-2672
09/05/2023, 11:03 AMsparse-lifeguard-95737
09/05/2023, 3:45 PMos.environ['DJANGO_SETTINGS_MODULE'] = 'path.to.test.settings'
django.setup()
and then have all the apps listed in INSTALLED_APPS
in path/to/test/settings.py
. this works reliably for ussparse-lifeguard-95737
09/05/2023, 3:48 PMconftest.py
, otherwise Pants won’t see it
• In your INSTALLED_APPS
, use the full names of your AppConfig
subclasses:
# Instead of this:
INSTALLED_APPS = (
"apps.app1",
"apps.app2",
)
# Do this:
INSTALLED_APPS = (
"apps.app1.apps.App1Config",
"apps.app1.apps.App2Config",
)
sparse-lifeguard-95737
09/05/2023, 3:49 PM__init__.py
to its apps.py
freezing-fall-2672
09/05/2023, 4:09 PM