无法运行我的Django应用服务器
我无法启动我的Django应用的服务器。下面是自从上次成功运行以来发生的一些事情:
我的电脑出现了一些问题,所以我把项目保存在一个服务器上,并在服务器上工作了两周,确保我可以顺利开发(一开始一切都很好)。然后我把电脑格式化了,所以又重新安装了一切。
当我尝试运行python manage.py runserver
命令时,它让我安装我需求文件中的所有内容。我照做了。
现在所有的需求都安装好了(或者我认为是这样),但是在运行命令时,我得到了以下信息:
(是的,我试过 syncdb
)
$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/Library/Python/2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Library/Python/2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/Library/Python/2.7/site-packages/django/apps/config.py", line 197, in import_models
self.models_module = import_module(models_module_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Library/Python/2.7/site-packages/tastypie/models.py", line 32, in <module>
from tastypie.compat import AUTH_USER_MODEL
File "/Library/Python/2.7/site-packages/tastypie/compat.py", line 14, in <module>
User = get_user_model()
File "/Library/Python/2.7/site-packages/django/contrib/auth/__init__.py", line 136, in get_user_model
return django_apps.get_model(settings.AUTH_USER_MODEL)
File "/Library/Python/2.7/site-packages/django/apps/registry.py", line 199, in get_model
self.check_models_ready()
File "/Library/Python/2.7/site-packages/django/apps/registry.py", line 131, in check_models_ready
raise AppRegistryNotReady("Models aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
有什么想法吗??
谢谢