Re: inheritance of fields and default values from parent model class

2010-10-24 Thread Phlip
> > class MyModel(models.Model): > >     alias = models.ForeignKey('self', blank=True, null=True) > >     manager = [my alias manager here] > >     def getAlias: > >           [whatever I need] > > > class Person(MyModel): > >     name = models.CharField(max_length=255) > > > class Place(MyModel):

Re: inheritance of fields and default values from parent model class

2010-10-24 Thread Phlip
pixelcowboy wrote: > Hi, I would like to create an inheritance relationship, similar to an > abstract class, where the child class inherits all thefieldsfrom the > parent class, but also gets its default values from the parent > instance. So basically Im confused about the concepts, I know an > ab

inheritance of fields and default values from parent model class

2010-09-12 Thread pixelcowboy
Hi, I would like to create an inheritance relationship, similar to an abstract class, where the child class inherits all the fields from the parent class, but also gets its default values from the parent instance. So basically Im confused about the concepts, I know an abstract class would not have