Hi guys!
I want to do a 2 layer join, look at the tables:
class State(models.Model):
name = models.CharField(maxlength=200)
class Region(models.Model):
state = models.ForeignKey(State)
name = models.CharField(maxlength=200)
class City(models.Model):
region = models.ForeignKey(Region)
name = models.CharField(maxlength=200)
How do I select all the Cities from a State? I'm from sqlobject world
and I don't realize how can I do this with django.
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---