I’m attempting to launch a GeoDjango app. I’ve installed Postgres & PostGIS using brew on Lion. I created a database using template_postgis: createdb -T template_postgis test.
When I run python manage.py syncdb, I get the following error:
django.core.exceptions.ImproperlyConfigured: Cannot determine
PostGIS version for database “test”. GeoDjango requires at least
PostGIS version 1.3. Was the database created from a spatial database
template?
How can I track down the source of the error? I’ve checked that the user & pass in the config have access to the database etc.
As a first debugging step: try to check the postgis template version manually, e.g. on the command-line connect to your database with
psql test, and query withselect postgis_lib_version();. This function should be defined in template_postgis and return some number. Example output:If an error occurs, you know the error is in the database.