1

私は現在djangoで遊んでいて、データベースpostgresqlとして使用したいと考えています:

ここに画像の説明を入力

これらは私の設定ファイルの私の設定です:

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

postgresql_psycopg2 でも試してみて、psycopg2 ( http://www.stickpeople.com/projects/python/win-psycopg/ ) もインストールしました。

構成に何が問題なのですか?

アップデート:

エラー:

>   File
> "C:\Python27\lib\site-packages\django\core\management\__init__.py",
> line 382, in execute
>     self.fetch_command(subcommand).run_from_argv(self.argv)   File "C:\Python27\lib\site-packages\django\core\management\base.py", line
> 196, in run_from_argv
>     self.execute(*args, **options.__dict__)   File "C:\Python27\lib\site-packages\django\core\management\base.py", line
> 232, in execute
>     output = self.handle(*args, **options)   File "C:\Python27\lib\site-packages\django\core\management\base.py", line
> 371, in handle
>     return self.handle_noargs(**options)   File "C:\Python27\lib\site-packages\django\core\management\commands\syncdb.py",
> line 57, in handle_noargs
>     cursor = connection.cursor()   File "C:\Python27\lib\site-packages\django\db\backends\dummy\base.py", line
> 15, in complain
>     raise ImproperlyConfigured("settings.DATABASES is improperly configured. " django.core.exceptions.ImproperlyConfigured:
> settings.DATABASES is improperly configured. Please supply the ENGINE
> value. Check settings documentation for more details.
4

1 に答える 1