You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 27, 2021. It is now read-only.
In my INSTALLED_APPS, my_app is not specified as simply as my_app but rather as my_app.apps.MyAppConfig. My tasks are located at my_app.tasks but autodiscover() looks for them at my_app.apps.MyAppConfig.tasks because of how it iterates over INSTALLED_APPS.
autodiscover tries to import_module('my_app.apps.MyAppConfig') and fails because MyAppConfig is not a module. I don't know enough about AppConfigs or INSTALLED_APPS to know if it's a reasonable fix to assume the first part of the path is always an app e.g. import_module(app.split('.')[0])
The text was updated successfully, but these errors were encountered:
unformatt
changed the title
Tasks are not autodiscovered when using explicit AppConfig
Tasks are not autodiscovered when using explicit AppConfig in INSTALLED_APPS
Feb 13, 2019
In my
INSTALLED_APPS
, my_app is not specified as simply asmy_app
but rather asmy_app.apps.MyAppConfig
.My tasks are located atmy_app.tasks
butautodiscover()
looks for them atmy_app.apps.MyAppConfig.tasks
because of how it iterates overINSTALLED_APPS
.autodiscover
tries toimport_module('my_app.apps.MyAppConfig')
and fails because MyAppConfig is not a module. I don't know enough about AppConfigs orINSTALLED_APPS
to know if it's a reasonable fix to assume the first part of the path is always an app e.g.import_module(app.split('.')[0])
The text was updated successfully, but these errors were encountered: