我已从link
安装了以下内容django-nonrel
djangotoolbox
mongodb-engine
我改变了我的installed_apps
INSTALLED_APPS = (
.. apps ..
)
到
INSTALLED_APPS = [
.. apps ..
]
但是我收到如下错误,
Validating models...
Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x12b8450>>
Traceback (most recent call last):
File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 92, in inner_run
self.validate(display_num_errors=True)
File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/core/management/base.py", line 280, in validate
num_errors = get_validation_errors(s, app)
File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/core/management/validation.py", line 28, in get_validation_errors
from django.db import models, connection
File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/db/__init__.py", line 40, in <module>
backend = load_backend(connection.settings_dict['ENGINE'])
File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django/db/utils.py", line 94, in __getitem__
conn = backend.DatabaseWrapper(db, alias)
File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/django_mongodb_engine-0.4.0-py2.7.egg/django_mongodb_engine/base.py", line 88, in __init__
File "/home/sakeer/workspace/entevirtual/lib/python2.7/site-packages/djangotoolbox-0.9.2-py2.7.egg/djangotoolbox/db/base.py", line 28, in __init__
TypeError: __init__() takes exactly 2 arguments (1 given)
我正在使用 Django 1.5 和 python 2.7
提前致谢
答案 0 :(得分:1)
django-nonrel
是Django 1.3的一个分支,所以你不能在Django 1.5中使用它。尝试卸载Django 1.5。