18👍
I had the same problem with PostgreSQL 9.3 and PostGIS 2.1 installed on OS X 10.9.1 using homebrew.
For this particular issue, you only need to add this line:
POSTGIS_VERSION = ( 2, 1 )
using the comma separated number for your PostGIS version to settings.py
.
I’m not sure why, but Django’s having trouble reading the version information from PostGIS.
5👍
Whenever I’ve got this error in a similar situation (i.e. when the database seems to be a perfectly valid PostGIS database) it has turned out that there’s been an error in DATABASES
in settings.py
. It’s actually authentication when connecting to the database failing, but it just happens that the first thing that touches the database when starting up my GeoDjango project is the postgis_lib_version
call from django/contrib/gis/db/backends/postgis/operations.py
- ProgrammingError: column "product" is of type product[] but expression is of type text[] enum postgres
- Django: Limiting the number of relationships in a OnetoMany relationship
- How to go from a Model base to derived class in Django?
- How do I run periodic tasks with celery beat?
- Django JWT Authentication behavior different between local & mod_wsgi servers with Django REST framework
1👍
I had the same issue a couple months ago. I had to recreate the template_database and the main db again. From this link.
- Django calling REST API from models or views?
- How to get max value in django ORM
- Error: Cursor' object has no attribute '_last_executed
- How to add a default array of values to ArrayField?
- Newline in label for Django form field