1

リンクから以下をインストールしました

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)

私はDjango1.5python2.7を使用しています

前もって感謝します

4

1 に答える 1

1

django-nonrelは Django 1.3 のフォークなので、Django 1.5 では使用できません。Django 1.5 をアンインストールしてみてください。

于 2013-03-13T11:30:33.553 に答える