python - heroku postgis makemigrations error geodjango -


so have multi build pack installed build pack heroku

https://github.com/ddollar/heroku-buildpack-multi.git 

and have .buildpacks file

https://github.com/cyberdelia/heroku-geo-buildpack.git#1.3 https://github.com/heroku/heroku-buildpack-python 

the installation works when run python manage.py makemigrations error:

django.core.exceptions.improperlyconfigured: cannot determine postgis version  database "d34ce1ddsg9nkp". geodjango requires @ least postgis version 1.3.  database created spatial database template? 

i have tried multiple ways of setting database in settings.py such as:

        geos_library_path = environ.get('geos_library_path')         gdal_library_path = environ.get('gdal_library_path') ,         geos_library_path = "{}/libgeos_c.so".format(environ.get('geos_library_path'))         gdal_library_path = "{}/libgdal.so".format(environ.get('gdal_library_path')) 

what doing wrong?

ok fixed enabling postgis on heroku running these commands

heroku pg:psql create extension postgis; 

then ran command see version had on heroku

select postgis_full_version(); 

then put settings.py file

postgis_version = (2, 1, 5) 

and viola works!


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -