我想使用 OneToOneField 模型字段,用户 ID 作为外键。例如:
owner_id = models.OneToOneField("User.id")
但是,我得到这个错误:
'owner_id' has a relation with model User.id, which has either not been installed or is abstract.
我也尝试过Users.id。
我想使用 OneToOneField 模型字段,用户 ID 作为外键。例如:
owner_id = models.OneToOneField("User.id")
但是,我得到这个错误:
'owner_id' has a relation with model User.id, which has either not been installed or is abstract.
我也尝试过Users.id。