【发布时间】:2015-06-05 03:59:40
【问题描述】:
所以我为 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'))
我做错了什么?
【问题讨论】:
标签: python django heroku geodjango buildpack