У меня возник вопрос. Как обратится от start_point и end_point модели Pipeline к 3-м объектам(Factory, OilSump, OilStorage) к полям address
class Factory(models.Model):
title = models.CharField(max_length=200)
address = YmapCoord(max_length=200, start_query=u'Россия', size_width=500, size_height=500, unique = True)
def __str__(self):
return self.title
class OilSump(models.Model):
title = models.CharField(max_length=200)
address = YmapCoord(max_length=200, start_query=u'Россия', size_width=500, size_height=500, unique = True)
def __str__(self):
return self.title
class OilStorage(models.Model):
title = models.CharField(max_length=200)
address = YmapCoord(max_length=200, start_query=u'Россия', size_width=500, size_height=500, unique = True)
def __str__(self):
return self.title
class Pipeline(models.Model):
title = models.CharField(max_length=200)
start_point = ????
end_point = ????