Django 1.8无法启动

时间:2022-11-30 20:54:38

After migrating to Django 1.8 my app doesn't start. Error I'm getting is:

迁移到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

I can't find solution for that issue :/

我无法找到该问题的解决方案:/

1 个解决方案

#1


1  

I think I found the problem. I use celery and to make it work in Django 1.7 I had to add this line to celery.py

我想我发现了这个问题。我使用芹菜并使它在Django 1.7中工作我不得不将此行添加到celery.py中

django.setup()

After removing it, both celery and my app started to work :)

删除后,芹菜和我的应用程序开始工作:)

@Brandon you're 100% right - this exception tells nothing ;)

@Brandon你100%正确 - 这个例外什么都没说;)

#1


1  

I think I found the problem. I use celery and to make it work in Django 1.7 I had to add this line to celery.py

我想我发现了这个问题。我使用芹菜并使它在Django 1.7中工作我不得不将此行添加到celery.py中

django.setup()

After removing it, both celery and my app started to work :)

删除后,芹菜和我的应用程序开始工作:)

@Brandon you're 100% right - this exception tells nothing ;)

@Brandon你100%正确 - 这个例外什么都没说;)