Python 重构模型,现在芹菜赢了';开始
我有一个名为“uar”的django应用程序,我重构了Python 重构模型,现在芹菜赢了';开始,python,django,django-celery,Python,Django,Django Celery,我有一个名为“uar”的django应用程序,我重构了uar/models.py,这样在uar\u common/models.py中就有了基类,比如说 class ReviewPerson(models.Model): 我有 class ReviewPerson(uar_common.models.CommonPerson): 我将uar\u common添加到settings.py中已安装的应用程序中,我的应用程序运行良好。但我的芹菜任务在过去很管用,现在不再管用了。我总是以python
uar/models.py
,这样在uar\u common/models.py
中就有了基类,比如说
class ReviewPerson(models.Model):
我有
class ReviewPerson(uar_common.models.CommonPerson):
我将uar\u common
添加到settings.py中已安装的应用程序中,我的应用程序运行良好。但我的芹菜任务在过去很管用,现在不再管用了。我总是以python manage.py芹菜工人--loglevel=debug
开始它,但现在它立即消失,堆栈跟踪以以下内容结束:
File "/home/ptomblin/src/cart/uar/models.py", line 8, in <module>
class ReviewPerson(uar_common.models.CommonPerson):
AttributeError: 'module' object has no attribute 'models'
导入模型并找到正确的记录没有问题
那么为什么djCellery找不到新的基类呢?我在Cellery\u导入中添加了以下内容
'uar_common.models',
'uar_history.models',
现在它开始工作了
'uar_common.models',
'uar_history.models',