我试图在django1.7中做一些model inheritance ,我想知道是否有一种方法可以覆盖外键字段?我有一个课程计划,我想能够定义具有相同功能的多个课程(页面、问题、级别等)
这是我的代码:
http://hastebin.com/ixekepolik.py(第117、118、120、121、123、129和131行)
我当前收到此错误:
django.core.exceptions.FieldError: Local field 'level' in class 'HVPage' clashes with field of similar name from base class 'Page'
从我读到的here来看,它目前是不允许的(在django1.7中也是如此)
相关问题 更多 >
编程相关推荐