6

私はgeodjangoが初めてです。私はdjango-1.4.5と私のデータベース設定を使用しています。

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

そして、エラーが発生しまし'module' object has no attribute 'GeoSQLCompiler' た 問題を解決してください。

4

1 に答える 1

20

交換:

'エンジン': 'django.db.backends.postgresql_psycopg2'

'エンジン': 'django.contrib.gis.db.backends.postgis'
于 2013-10-28T09:37:36.153 に答える