Django BaseGenericInlineFormSet forms not inheriting FormSet instance as form instance related_object
问题 I'm using Django 1.8 and I have an Image class that looks like this: # The `child` class class Image(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() related_object = GenericForeignKey('content_type', 'object_id') image = models.ImageField(...) def clean(self): related_class = self.content_type.model_class() # Do some validation that relies on the related_class And a "parent" class that has a GenericRelation to it: # The `parent` class