I use celery with my django project.
In the celery task file, I need to import my models in order to call the model methods. However, I would also like my model to be able to run certain celery tasks.
Now I import my models into celery, but when I try to import celery tasks into my model files, they lead to an import cycle and an import error.
What is the right way to do this?
django celery importerror
Lan lewin
source share