我在跟踪
these instructions
以便在windows上设置django。我已经为python 2.6安装了python2.6、postgresql 8.4、psycopg2.0.14,并从svn安装了django的最新版本。
我现在按照以下说明运行测试项目(从链接到上面的页面复制):
C:\Documents and Settings\John>cd C:\
C:\>mkdir django
C:\>cd django
C:\django>django-admin.py startproject testproject
C:\django>cd testproject
C:\django\testproject>python manage.py runserver
当我运行最后一行时,这是输出:
Validating models...
Unhandled exception in thread started by <function inner_run at 0x01ECB930>
Traceback (most recent call last):
File "J:\Python26\lib\site-packages\django\core\management\commands\runserver.py", line 48, in inn
er_run
self.validate(display_num_errors=True)
File "J:\Python26\lib\site-packages\django\core\management\base.py", line 249, in validate
num_errors = get_validation_errors(s, app)
File "J:\Python26\lib\site-packages\django\core\management\validation.py", line 22, in get_validat
ion_errors
from django.db import models, connection
File "J:\Python26\lib\site-packages\django\db\__init__.py", line 14, in <module>
if not settings.DATABASES:
File "J:\Python26\lib\site-packages\django\utils\functional.py", line 273, in __getattr__
return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'DATABASES'
我忘了对数据库做些什么了吗?
任何帮助都将不胜感激。谢谢您!
编辑:
似乎我所有的问题(包括这个问题)都是因为我使用了svn的django开发版本。我删除了开发版本并安装了django 1.1.1,最后不再有奇怪的错误消息,服务器正在运行!