Abstract Inheritance in Django Model, causing MAX recursion depth error
问题 I'm trying to implement abstract inheritance in Django with the following code, but it produces a MAX recursion depth error. I'm trying to override a model's save method. class BaseModel(models.Model): class Meta: abstract = True def save(self, *args, **kwargs): #i'm doing something here #i think the problem is in the return statement specifically because of the #self.__class__ expression. return super(self.__class__, self).save(*args, **kwargs) class MyModel(BaseModel): p = models.CharField