def __unicode__(self):
return self.identity
class Meta:
verbose_name = "Person"
verbose_name_plural = "People"
class Student(Person):
class Meta:
proxy = True
class Parent(Person):
class Meta:
proxy = True
class Teacher(Person):
board = GenericRelation('second_app.BoardMember') # first try
class Meta:
proxy = True
class BoardMember(models.Model):
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = GenericForeignKey('content_type', 'object_id',
for_concrete_model=False)
responsabilities = models.CharField(max_length=255)
}}}
In the 'first try', deleting the `Teacher` record (proxy) does not delete
the `BoardMember` record. However, in the 'second try', deleting the
`Person` record (concrete), does delete the `BoardMember` record.
--
Ticket URL: <https://code.djangoproject.com/ticket/29387>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "29387-regression-test.patch" added.
Regression test — already passes
* status: new => closed
* resolution: => worksforme
Comment:
I uploaded a regression test attempting to reproduce this. It already
passes.
If we can get a failing test case reproducing the issue then we could look
into it. Pending that I'm going to close.
--
Ticket URL: <https://code.djangoproject.com/ticket/29387#comment:1>