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.
PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects allowing location queries to be run in SQL.
However, Postgres. app has been adding support for other extensions, and now comes with support for PostGIS, PLV8 and MVT already built in. If you want PgRouting, you can use Homebrew to install the dependencies it needs, and build it from source.
Just add in your settings.py your right version of postgis :
POSTGIS_VERSION = (2, 0, 3)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With