I have the following model in django:
class Node(models.Model):
name = models.CharField(max_length=255)
And this subclass of the above model:
class Thingy(Node):
name = models.CharField(max_length=100)
otherstuff = models.CharField(max_length=255)
The problem with this setup is that while everything Just Works, a look into the database shows that syncdb has created two tables. One called appname_node
with a column called name
and another one called appname_thingy
with two columns: name
and otherstuff
. When a new object is created, the name
value is copied into both tables... not really cool if you dig the whole concept of normalisation :-)
Can someone explain to me how I might modify the max_length value of the "name" property in "Thingy" without re-defining it?