gpt4 book ai didi

python - django-注册 "registery isn' t 准备就绪”错误

转载 作者:行者123 更新时间:2023-11-30 23:29:50 26 4
gpt4 key购买 nike

我使用的是 Python 3.3、Django 1.6 和 Django-registration 1.1

我使用 setup.py 安装了 django-registraiton。我放置了

     INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.sites',
'registration',
# ...other installed applications...
)
ACCOUNT_ACTIVATION_DAYS = 7

在settings.py中它应该在的地方

但是当我运行时

python manage.py syncdb 

我收到运行时异常:应用程序注册表尚未准备好

回溯:

...
File "...\registration\models.py, line 15, in <module>
User = get_user_model()
File "...\django\contrib\auth\__init__.py", line 133, in get_user_model
user_model = apps.get_model(app_label, model_name)
File "...\django\apps\registry.py", line 115, in check_ready
raise RuntimeError("App registry isn't ready yet.")

有人知道我做错了什么吗?

我查看了代码,并在就绪检查上方看到了此注释

 Raises LookupError if no application exists with this label, or no
model exists with this name in the application.

编辑:安装 cygwin 并尝试让它在那里工作后,我仍然遇到相同的错误。我将尝试在桌面上安装,看看会发生什么。还有其他人以前见过这个吗?

最佳答案

看起来您在'注册',上有一个空间,请尝试'注册',

关于python - django-注册 "registery isn' t 准备就绪”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20947783/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com