django:关于ubuntu lucid的django 1.2

时间:2010-06-07 09:26:53

标签: django django-1.2 ubuntu-10.04

我正试图在我的ubuntu lucid上运行django,但我得到以下内容:

Traceback (most recent call last):
  File "./manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 209, in execute
    translation.activate('en-us')
  File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/__init__.py", line 66, in activate
    return real_activate(language)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/functional.py", line 55, in _curried
    return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
  File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/__init__.py", line 36, in delayed_loader
    return getattr(trans, real_name)(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 193, in activate
    _active[currentThread()] = translation(language)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 176, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 159, in _fetch
    app = import_module(appname)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/gruszczy/Programy/bozorth/../bozorth/notifications/__init__.py", line 2, in <module>
    from django.db.models.signals import post_save
  File "/usr/local/lib/python2.6/dist-packages/django/db/__init__.py", line 75, in <module>
    connection = connections[DEFAULT_DB_ALIAS]
  File "/usr/local/lib/python2.6/dist-packages/django/db/utils.py", line 92, in __getitem__
    conn = backend.DatabaseWrapper(db, alias)
  File "/usr/local/lib/python2.6/dist-packages/django/db/backends/sqlite3/base.py", line 154, in __init__
    super(DatabaseWrapper, self).__init__(*args, **kwargs)
TypeError: __init__() takes exactly 2 arguments (3 given)

我创建并清空了项目,只更改了数据库设置:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'test.db3',                      # Or path to database file if using sqlite3.
        'USER': '',                      # Not used with sqlite3.
        'PASSWORD': '',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
    }
}

我缺少一些依赖吗?

1 个答案:

答案 0 :(得分:0)

尝试在Multiple database format

中定义数据库