hello hello

I must be a bit dumb, but I find myself a bit stucked with model
subclassing. Here's the problem: how does one call on the superclass
method when extending this method in the subclass ? ie:

class Parent(meta.Model):
  ....
  def my_method(self):
     do_something_here


class Derived(Parent):
  ....
  def _pre_save(self):
     do_some_other_things_here
     Parent.my_method(self) # raises NameError, "Parent" is not defined
     parents.Parent.my_method(self) # idem, "parents" is not defined


Is this a known issue, or I'm I missing something ? FWIW, the method I'm
trying to extend is actually _pre_save() - but I don't think it has much
to do with this problem..

NB : I've solved the problem at hand using a template method pattern as
a workaround, but if the bug is - as often - between the chair and the
keyboard, please let me know...

TIA

-- 
bruno desthuilliers
développeur
[EMAIL PROTECTED]
http://www.modulix.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to