所以我为heroku的构建包安装了多个构建包
https://github.com/ddollar/heroku-buildpack-multi.git
我有 .buildpacks 文件
https://github.com/cyberdelia/heroku-geo-buildpack.git#1.3
https://github.com/heroku/heroku-buildpack-python
安装工作,但是当我运行 python manage.py makemigrations 我得到这个错误:
django.core.exceptions.ImproperlyConfigured: Cannot determine PostGIS version
for database "d34ce1ddsg9nkp". GeoDjango requires at least PostGIS version 1.3.
Was the database created from a spatial database template?
我尝试了多种在 settings.py 中设置数据库的方法,例如:
GEOS_LIBRARY_PATH = environ.get('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = environ.get('GDAL_LIBRARY_PATH')
and
GEOS_LIBRARY_PATH = "{}/libgeos_c.so".format(environ.get('GEOS_LIBRARY_PATH'))
GDAL_LIBRARY_PATH = "{}/libgdal.so".format(environ.get('GDAL_LIBRARY_PATH'))
我究竟做错了什么?