Django并保持坐标
答
这是我用来存储谷歌的纬度/经度
lat = models.FloatField(_('Latitude'), blank=True, null=True)
lon = models.FloatField(_('Longitude'), blank=True, null=True)
答
可能一个更好的主意是十进制字段来存储
lat = models.DecimalField(_('Latitude'), max_digits=10, decimal_places=8)
lng = models.DecimalField(_('Longitude'), max_digits=11, decimal_places=8)
旧的职位,但 “_” 为“( '纬度')? – Marcus 2013-10-18 23:53:37
@ Mhsmith21的盈方是什么:_是gettext-functions的一个常用快捷方式。从'django.utils.translation'中输入''''将ugettext输入为_'。参见[这里](https://docs.djangoproject.com/en/dev/topics/i18n/translation /) – sphere 2013-11-06 12:55:37