agateblue/django-navutils

Cannot handle apps with a custom AppConfig in `INSTALLED_APPS`

Closed this issue · 0 comments

When specifying a customer AppConfig in one's package, and adding the INSTALLED_APPS like

INSTALLED_APPS = [
    ...
    'my_app.apps.CustomAppConfig',
    ...
]

The autodiscover method with bork with

ModuleNotFoundError: No module named 'my_app.apps.CustomAppConfig'; 'my_app.apps' is not a package

This method of specifying the INSTALLED_APPS as above can be expected in any Django >= 1.7 application (https://docs.djangoproject.com/en/2.1/ref/applications/#configuring-applications). The obvious workaround for users is to specify a default_app_config, however you can't always expect users to be able to do that, especially if they configure multiple AppConfig's.