【问题标题】:Django: application skipped in syncdbDjango:在syncdb中跳过应用程序
【发布时间】:2011-07-28 23:40:32
【问题描述】:

我在 settings.py 中声明了几个应用程序:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.messages',
'authentication',
'catalogs',
'configurations',
    ...
)

当运行syncdb 时,authentication 应用程序被跳过并且它的表没有被创建,但我没有收到任何错误。

其他应用都正常。

我认为某些错误会阻止应用程序正常运行。

对吗?怎么调试?

谢谢

【问题讨论】:

  • 是的,我有,但现在它已从 INSTALLED_APPS 中排除

标签: django django-syncdb django-settings


【解决方案1】:

我明白了!我的代码确实有错误。

只是运行manage.py shell 并请求from authentication.models import * 就会引发错误。

【讨论】:

  • 这是一个循环导入:为了简单起见,在authentication/models.py 中,我从应用程序中导入了一个类,该类在 INSTALLED_APPS 中的“身份验证”之后列出。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-04-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-02-19
  • 1970-01-01
  • 2012-05-09
相关资源
最近更新 更多