Thursday, June 23, 2011

geodjango object has no attribute 'geo_db_type

Following the geodjango tutorial https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/

While building the application called world, one has to run the following command to initialise the database :

python manage.py sqlall world
....
AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type'

The error is solved by editing settings.py and replacing the line
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2',
with
'ENGINE': 'django.contrib.gis.db.backends.postgis', # Add 'postgresql_psycopg2',

Thanks to http://stackoverflow.com/questions/3567352/geodjango-syncdb-errors-from-geodjango-tutorial

No comments:

Post a Comment