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
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)
>
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
3 matches
Mail list logo