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
1.0.13 ImportError: No module named 'myapp.apps.MyappsConfig'; 'myapps.apps' is not a package
That's due to django's upgrade from using INSTALLED_APPS to apps.get_app_configs().
Change autodiscover() in tasks.py to below would fix this:
def autodiscover(): '''autodiscover tasks.py files in much the same way as admin app''' import imp #from django.conf import settings from django.apps import apps
#for app in settings.INSTALLED_APPS: for app_config in apps.get_app_configs():
The text was updated successfully, but these errors were encountered:
The autodiscover method seems to be legacy code from the original project, and I am not sure whether it contributes anything meaningful.
From version 1.0.14, the ImportError is caught and ignored (which implies that apps that are installed via AppConfig path are not "autodiscovered" anymore).
I don't understand this...my app was configured with an apps.Config file in INSTALLED_APPS and so process_task silently failed until I finally just looked at the source for autodiscover(). Shouldn't this be in the docs somewhere? If tasks are in the db but can't be imported, shouldn't there be some kind of logging error or visible failure somewhere?
1.0.13 ImportError: No module named 'myapp.apps.MyappsConfig'; 'myapps.apps' is not a package
That's due to django's upgrade from using INSTALLED_APPS to apps.get_app_configs().
Change autodiscover() in tasks.py to below would fix this:
def autodiscover():
'''autodiscover tasks.py files in much the same way as admin app'''
import imp
#from django.conf import settings
from django.apps import apps
#for app in settings.INSTALLED_APPS:
for app_config in apps.get_app_configs():
The text was updated successfully, but these errors were encountered: