Hi,
I have 2 abstract classes with an overrided save function, class BaseA and
class BaseB. BaseA trigger the models.Model save function, the other
doesn't.

class BaseA(models.Model):
    class Meta:
        abstract = True

    def save(self, *args, **kwargs):
        super(BaseA, self).save(*args, **kwargs)


class BaseB(models.Model):
    class Meta:
        abstract = True

   def save(self, *args, **kwargs):
       pass

Now I define a class that inherits from both of these classes:

class test1(BaseA, BaseB):
    integer = models.IntegerField()

and when I save a test1 object it is not saved into the database. The reason
is that BaseB class doesn't call super save function. But actually I don't
see why this fact entails the object isn't saved, because models.Model
function is called through BaseA. What is the reason of this behavior? What
can I do in order to save an object into the db when I inherit from multiple
class and one of them doesn't call the super save function?


Many Thanks!
-- 
Marc

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to