【问题标题】:How to configure Postgis for GeoDjango on Openshift如何在 Openshift 上为 GeoDjango 配置 Postgis
【发布时间】:2014-08-23 07:21:29
【问题描述】:

在使用 django 和 postgres9.2 墨盒在 Openshift 中创建新应用程序后,我一直不知道如何设置 geodjango。

我试过跑步

psql -d db_name -f /usr/share/pgsql/contrib/postgis-64.sql
psql -d db_name -f /usr/share/pgsql/contrib/spatial_ref_sys.sql

但它会抛出类似的错误

psql:/usr/share/pgsql/contrib/postgis-64.sql:7774: ERROR:  type "box2d" does not exist
psql:/usr/share/pgsql/contrib/postgis-64.sql:7775: ERROR:  type "geometry" does not exist

你觉得我应该怎么做?

【问题讨论】:

标签: django openshift postgis geodjango


【解决方案1】:

按照these instructions,在 PostgreSQL 9.1+ 上安装 PostGIS 2.0+ 的推荐方法是:

CREATE EXTENSION postgis;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-03-15
    • 2016-10-20
    • 2020-06-09
    • 1970-01-01
    • 2023-03-04
    • 2020-01-08
    • 2012-06-15
    相关资源
    最近更新 更多