首先,我是django的新手。我正在嘗試在Django 1.10的POSTGIS數據庫中使用GeoLite(GeoIP2)數據集。當我嘗試配置myapp/settings.py文件時,我收到了錯誤消息。似乎django目錄中的不同路徑中存在數據庫後端;您能否澄清原因?配置Postgresql POSTGIS數據庫
- Django的\的contrib \ GIS \ DB \後端\ PostGIS的
- Django的\ DB \後端
激活我的python3虛擬環境中,當我嘗試設置默認的數據庫在我的設置後。 PY文件的PostgreSQL(「django.db.backends.postgresql」),我得到一個錯誤:
AttributeError:」Database Operations’ object has no attribute ‘geo_db_type’.
當我嘗試使用POSTGIS作爲我的數據庫引擎(我設置在我的虛擬環境中GDAL_LIBRARY_PATH),我得到一個錯誤:
django.contrib.gis.db.backends.postgis' is not an available database backend. Try using 'django.db.backends.XXX', where XXX is one of 'mysql', 'oracle', 'postgresql',and 'sqlite'.
Error was: Cannot import name ‘GDALRaster’.
你能提出對上述錯誤信息的可能解決方案嗎?謝謝。