agateblue / django-navutils

A lightweight package for handling menus and breadcrumbs in your django project
BSD 3-Clause "New" or "Revised" License
40 stars 12 forks source link

Cannot handle apps with a custom AppConfig in `INSTALLED_APPS` #10

Closed wgordon17 closed 5 years ago

wgordon17 commented 5 years ago

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.