Re: Model inheritance, implicit OneToOneField and stray inherited reverse relations

2013-06-12 Thread Benjamin Wohlwend
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

Re: Model inheritance, implicit OneToOneField and stray inherited reverse relations

2013-06-12 Thread Tomas Ehrlich
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)

Model inheritance, implicit OneToOneField and stray inherited reverse relations

2013-06-12 Thread Benjamin Wohlwend
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()