所以我几个月来一直在研究Django项目,不久前我设置了一个Celery测试装置,工作正常。从那时起,我做了一些事情,将我的第三方应用程序和Django本身升级到1.9。今天我想再次实施芹菜,无法开始。它在我的应用程序中抛出了多个错误,Django本身并没有抱怨。它也忽略了我已经覆盖的应用程序。
我的文件结构
src/
apps/
core/
settings/
production.py
development.py
__init__.py
apps.py
celery.py
wsgi.py
...
app1/
app2/
...
manage.py
我的celery.py
from celery import Celery
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings.development')
from django.conf import settings
app = Celery('core')
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
使用此命令:
celery --app=core worker --loglevel=INFO
我得到的结论是:
File "/Users/../src/apps/core/urls.py", line 17, in <module>
from users.views import *
File "/Users/../src/apps/users/views.py", line 21, in <module>
from allauth.account.views import SignupView as AllAuthSignupView
File "/Users/../site/lib/python2.7/site-packages/allauth/account/views.py", line 19, in <module>
from .forms import (
File "/Users/../site/lib/python2.7/site-packages/allauth/account/forms.py", line 206, in <module>
class BaseSignupForm(_base_signup_form_class()):
File "/Users/../site/lib/python2.7/site-packages/allauth/account/forms.py", line 188, in _base_signup_form_class
' "%s"' % (fc_module, e))
django.core.exceptions.ImproperlyConfigured: Error importing form class core.forms: "cannot import name generic"
和
File "/Users/../site/lib/python2.7/site-packages/review/models.py", line 3, in <module>
from django.contrib.contenttypes import generic
ImportError: cannot import name generic
最后一个错误根本不应该发生,因为我已经覆盖了我项目中的应用程序。但它仍在阅读普遍安装的选项。然而,Django运行得很好。
关于我在这里做错了什么的想法?