Re: Problem with ForeignKey field

2010-02-28 Thread Ben Dowling
OK thanks. I didn't realise that was the implication of the related_name field. All working as expected now. Thanks, Ben On 28 Feb, 13:16, Daniel Roseman wrote: > On Feb 28, 11:46 am, Ben Dowling wrote: > > > > > I have a Thread and a Message model, as defined below: > > > class Thread(models.M

Re: Problem with ForeignKey field

2010-02-28 Thread Daniel Roseman
On Feb 28, 11:46 am, Ben Dowling wrote: > I have a Thread and a Message model, as defined below: > > class Thread(models.Model): >         modified = models.DateTimeField(auto_now=True, auto_now_add=True) > > class Message(models.Model): >         subject = models.CharField(max_length = 100) >    

Problem with ForeignKey field

2010-02-28 Thread Ben Dowling
I have a Thread and a Message model, as defined below: class Thread(models.Model): modified = models.DateTimeField(auto_now=True, auto_now_add=True) class Message(models.Model): subject = models.CharField(max_length = 100) thread = models.ForeignKey(Thread, related_name='t