我无法从这个示例models.py创建我的数据库。self.email
name = models.CharField(max_length=100)
point = models.PointField我想我需要添加一个默认值,我也尝试过了,方法是修改中的point = models.PointField(): point = models.PointField(default='POINT(
我在MacOS 10.7上使用的是Django1.2和最新版本的。当我运行manage.py syncdb来创建一个包含PointField的数据库时,我得到以下错误:Failed tostores.Store model: operator class "gist_geometry_ops" does not exist for access method "gist"
这是我之前用来创建空间数据库的
我试图在django模型的一个字段中存储多个位置,但我不太确定如何实现。我使用GeoDjango的PointField存储最新报告的位置。# srid 4326 is the WGS84 Spheroid used by GPS
current_pos = models.PointField(editable=True另一种方法似乎是使用ForeignKey与Location模型建立多到多的关系,但我似乎无法理解它是如何工作的,因为每个Tracker在该领域都会