1
class Person(models.Model):
name = models.CharField(max_length=20)
employer = models.CharField(max_length=20)
class Phone(models.Model):
person = models.ForeignKey(Person)
number = models.CharField(max_length=10)
vendor = models.CharField(max_length=20)
如何編寫一個查詢檢索所有電話的對象,其中Phone.number = 945678987
和Person.employer = 'xyz'
?Django的 - 加入2種型號在查詢