Hey guys,
I am trying to do something very basic here with three models:
class Car(models.Model):
country = models.ForeignKey(Country)
company_name = models.CharField(max_length=50)
continent = models.CharField(max_length=50)
class CountryProfile(models.Model):
country = models.ForeignKey(Country)
minimum_wage = models.IntField()
class Country(models.Model):
name = models.CharField(max_length=50)
Basically, Car points to Country, and CountryProfile also points to Country. I was wondering how I could get all car's company names with continent equal to something and minimum wage associated with the country of a respective car company, without having to do two db calls.
Thanks!