我早些时候发布了一个类似的问题,但是这个不同。我有一个相关类的模型结构,如:django:更改扩展模型类的默认值
class Question(models.Model):
ques_type = models.SmallIntegerField(default=TYPE1, Choices= CHOICE_TYPES)
class MathQuestion(Question):
//Need to change default value of ques_type here
// Ex: ques_type = models.SmallIntegerField(default=TYPE2, Choices= CHOICE_TYPES)
我想更改派生类中ques_type的默认值。我应该怎么做到这一点?
我在派生类中添加新字段。所以代理类方法将不起作用。 – Neo 2011-02-05 01:12:14