2👍
Found the problem. My Django project structure did not follow the default structure of-
--proj
|-- __init__.py
|-- settings.py
--accounts
|--__init__.py
--app2
|-- __init__.py
Instead if followed:
--proj
|-- __init__.py
|-- settings.py
|-- apps
|--accounts
|--__init__.py
|--app2
|-- __init__.py
which was causing Celery to find the module.
0👍
Also if you have such a structure you can ‘hack’ it this way:
sys.path.append(os.path.abspath('apps'))
before setting
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
It worked for me. Of course you have to adjust the path in sys.path
to your project structure.
- [Answered ]-How to make a dictionary of two sets of related objects in django?
- [Answered ]-Redefining home in django
- [Answered ]-Django rest frame work – File upload fails in test but working everywhere else
- [Answered ]-How does DRF know a simple POST request should call create()?
Source:stackexchange.com