I have a Django project with several applications. They all share db with engine = django.db.backends.postgresql_psycopg2. Now I want some functions GeoDjangoand decided that I want to integrate it into my existing project. I read a tutorial, and it looks like I need to create a separate spatial database for GeoDjango. Interesting, anyway. I tried adding this to one of my .py model models without changing the db settings:
from django.contrib.gis.db.models import PointField
class Location(models.Model):
location = PointField()
But when I run syncdb, I got this error.
File "/home/virtual/virtual-env/lib/python2.7/site-packages/django/contrib/gis/db/models/fields.py", line 200, in db_type
return connection.ops.geo_db_type(self)
source
share