有没有办法让“GeoData”在“商店”和“公园”对象的管理中内联显示?
(一个商店/公园可以包含多个位置)
# Location data
class GeoData(models.Model):
lat = models.FloatField()
lon = models.FloatField()
description = models.TextField()
# Parent class for every object with location data
class GeoEntity(models.Model):
title = models.CharField(max_length=32)
position = models.ForeignKey(GeoData)
class Shop(GeoEntity):
tel = models.CharField(max_length=32)
address = models.TextField()
class Park(GeoEntity):
wifi = models.BooleanField()
area = models.IntegerField()
我尝试了谷歌的许多选项,但没有一个有效。
谢谢。