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 回答