简体   繁体   English

使用Amazon RDS for GeoDjango?

[英]Using Amazon RDS for GeoDjango?

I want to run my site on a EC2 instance, using RDS for the Postgres database. 我想使用RDS for Postgres数据库在EC2实例上运行我的站点。 It supports PostGIS, but when I try to run the migrate command I get: 它支持PostGIS,但是当我尝试运行migration命令时,我得到了:

django.core.exceptions.ImproperlyConfigured: Cannot determine PostGIS version for database "mydb". GeoDjango requires at least PostGIS version 1.3. Was the database created from a spatial database template?

There isn't a postgis template database. 没有postgis模板数据库。 The scripts I normally use to create the template produce tons of errors, most likely because I'm running postgres 9.1 and AWS uses 9.3. 我通常用于创建模板的脚本会产生大量错误,这很可能是因为我正在运行postgres 9.1,而AWS使用9.3。 Before I try upgrading to 9.3 and pulling my hair out after that doesn't work smoothly because nothing ever does, is there something I'm missing here? 在尝试升级到9.3并拔出头发之前,由于没有任何作用,因此无法顺利进行,这里是否缺少我的东西?

Has anyone gotten GeoDjango running on an RDS database? 有没有人让GeoDjango在RDS数据库上运行?

听起来您需要手动创建扩展名:

CREATE EXTENSION postgis;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM