First off, I am new to django. I am trying to use GeoLite(GeoIP2) datasets in my POSTGIS database in Django 1.10. When I attempt to configure the myapp/settings.py file, i get error messages.There seem to be database backends in different paths in the django directory;Can you please clarify why?
- django\contrib\gis\db\backends\postgis
- django\db\backends
After activating my python3 virtual environment, when i try to set the default database in my settings.py file as postgresql('django.db.backends.postgresql'), i get an error:
AttributeError:”Database Operations’ object has no attribute ‘geo_db_type’.
When i try to use POSTGIS as my database engine (i set the GDAL_LIBRARY_PATH in my virtual environment), i get an error:
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’.
Can you suggest possible solutions to the above error messages? Thank you.