gpt4 book ai didi

python - “模块”对象没有属性 'GeoSQLCompiler'

转载 作者:太空狗 更新时间:2023-10-29 22:03:38 25 4
gpt4 key购买 nike

我是 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'请解决我的问题。

最佳答案

替换:

'ENGINE': 'django.db.backends.postgresql_psycopg2'

'ENGINE': 'django.contrib.gis.db.backends.postgis'

关于python - “模块”对象没有属性 'GeoSQLCompiler',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19226025/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com