迁移到Django 1.8
后,我的应用无法启动。我得到的错误是:
Traceback (most recent call last): File "./manage.py", line 20, in
<module>
execute_from_command_line(sys.argv) File "***/.virtualenvs/vtslive/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 338, in execute_from_command_line
utility.execute() File "***/.virtualenvs/vtslive/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 312, in execute
django.setup() File "***/.virtualenvs/vtslive/local/lib/python2.7/site-packages/django/__init__.py",
line 18, in setup
apps.populate(settings.INSTALLED_APPS) File "***/.virtualenvs/vtslive/local/lib/python2.7/site-packages/django/apps/registry.py",
line 78, in populate
raise RuntimeError("populate() isn't reentrant") RuntimeError: populate() isn't reentrant
我无法找到该问题的解决方案:/
答案 0 :(得分:1)
我想我发现了这个问题。我使用celery
并将其设为Django 1.7
我必须将此行添加到celery.py
django.setup()
删除后,celery
和我的应用都开始工作了:)
@Brandon你100%正确 - 这个例外什么都没说;)