Python Django位置字段-地图不';t显示
我正在实现一个django模式表单,其中有一个PlainLocationField(我遵循了这个tuto:)。我的问题是地图没有显示在我的模式中。我有这个: 这是我的密码: models.pyPython Django位置字段-地图不';t显示,python,django,Python,Django,我正在实现一个django模式表单,其中有一个PlainLocationField(我遵循了这个tuto:)。我的问题是地图没有显示在我的模式中。我有这个: 这是我的密码: models.py class Soiree(models.Model): ... city = models.CharField(max_length=255,default="") location = PlainLocationField(based_fields=['city'], zoom=7,
class Soiree(models.Model):
...
city = models.CharField(max_length=255,default="")
location = PlainLocationField(based_fields=['city'], zoom=7, default="")
设置.py
LOCATION_FIELD = {
'map.provider': 'google',
'map.zoom': 13,
'search.provider': 'google',
'search.suffix': '',
'provider.google.api': '//maps.google.com/maps/api/js?sensor=false',
'provider.google.api_key': '<my_api_key>',
'provider.google.api_libraries': '',
'provider.google.map.type': 'ROADMAP',
}
谢谢
class CreationSoireeForm(BSModalModelForm):
class Meta:
model = Soiree
fields = ['Intitule','Type_Soiree','city','location', 'confidentialite','soiree_date']
...