类 Folder 继承自类 Item,它具有 Folder 的外键:
class Item(models.Model):
# some fields
folder = models.ForeignKey('Folder')
class Folder(Item):
# some fields
当我尝试运行它时,我收到错误:
app.item: 'folder' has a relation with model Folder, which has either not been installed or is abstract
我认为正确的做法是将模型名称放在引号中,我已经这样做了,但这似乎没有帮助。我应该怎么做才能完成这项工作?
编辑:使用有意义的类名澄清问题