Hi,
if I have got several models that have identical code, except for
their save method, how can I use an abstract base class for them? Will
I have to overwrite save() for each model? Or is there a generic way
to define save(), i.e. a way that I have to use only once -- in the
abstract base class?
class BMW(models.Model):
...
save def save(self, *args, **kwargs):
do_something()
super(BMW, self).save(*args, **kwargs)
class Fiat(models.Model):
...
save def save(self, *args, **kwargs):
do_something()
super(Fiat, self).save(*args, **kwargs)
Jaroslav
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.