I am building a WebApp . AND I am stuck on an Error.
What i am trying to do
I am making a Location Based BlogApp and I am using PointField
in models.
The Problem
'DatabaseOperations' object has no attribute 'geo_db_type'
This error is keep showing when i migrate
. When i go into admin then this error is keep showing.
settings.py
This is the DataBase i am using.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWORD': '---------',
'HOST': 'localhost',
'PORT': '',
}
}
What have i tried
- I also tried chaning
'django.db.backends.postgresql_psycopg2'
to'django.contrib.gis.db.backends.postgis'
. BUT it is showing
django.db.utils.OperationalError: could not open extension control file "C:/Files/PostgreSQL/13/share/extension/postgis.control": No such file or directory
I also tried many answers but nothing worked for me.
I have installed
pip install psycopg2
.