Thanks, that worked. Now, can you please explain why it worked? What does the related_name do and why do I need it?
Thanks! Mark On Wed, May 23, 2012 at 7:34 AM, Simone Federici <s.feder...@gmail.com>wrote: > class Game(models.Model): > game_id = models.IntegerField(primary_key=True) > gamedate = models.DateField() > gamestart = models.TimetField(blank=True) > duration = models.IntegerField() > innings = models.IntegerField() > hometeam = models.ForeignKey(Team, related_name='homegame_set') > visitingteam = models.ForeignKey(Team, related_name='visitinggame_set') > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.