You will have to do content.link_set to retrieve the Link model related to
the Content model instance.
See:
https://docs.djangoproject.com/en/dev/topics/db/queries/#following-relationships-backward
On Thursday, June 12, 2014 2:54:48 PM UTC-4, Satinderpal Singh wrote:
>
> Suppose there are two
Suppose there are two tables defined in Django models:
class Link(models.Model):
links = models.CharField(max_length=50 ,blank=True)
and
class Content(models.Model):
link = models.OneToOneField(Link, primary_key=True)
title = models.CharField(max_length=50, blank=True)
content =
2 matches
Mail list logo