Hi Tom,
On Wednesday, June 12, 2013 10:25:24 AM UTC+2, Tomáš Ehrlich wrote:
>
> Hi Benjamin,
> you can create explicit OneToOne field with parent_link=True
>
> https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.OneToOneField.parent_link
>
>
> Then you can set different
Hi Benjamin,
you can create explicit OneToOne field with parent_link=True
https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.OneToOneField.parent_link
Then you can set different related_name for each model.
Cheers,
Tom
Dne Wed, 12 Jun 2013 01:10:40 -0700 (PDT)
Hi,
I have a bit of a problem with inherited reverse relations and django model
inheritance. Consider these models:
class Content(models.Model):
display = models.BooleanField()
class Link(Content):
url = models.URLField()
class Teaser(Content):
text = models.TextField()
3 matches
Mail list logo