Added a Point field in one of my model to load map.to migrate the changes in model ,in pycharm terminal python manage.py makemigrations run okay. but python manage.py migrate raise ValueError('Cannot use object with type %s for a spatial lookup parameter.' % type(obj).name) .
i think the reason could be changes in Django 2.2.I even tried using MultiPolygon field ,PointField .
settings.py
CORE_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'django.contrib.postgres',
'django.contrib.gis'
]
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
models.py
from django.contrib.gis.db import models
longitude = models.FloatField("Outlet Longitude", default=0.0, blank=False, help_text="Longitude")
latitude = models.FloatField("Outlet Latitude", default=0.0, blank=False, help_text="Latitude")
location = models.PointField()
i just want to load map .