> > 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):
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
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
3 matches
Mail list logo