ValueError: Related model u'app.model' cannot be resolved

后端 未结 6 761
甜味超标
甜味超标 2020-12-29 02:06

I have two applications (ook and eek say) and I want to use a foreign key to a model in ook from a model in eek. Both are

6条回答
  •  有刺的猬
    2020-12-29 02:18

    I just got the same error, but referring to a model that was declared as part of the same migration. It turned out that the first migrations.CreateModel(...) referred to a not yet declared model. I manually moved this below the declaration of the referred model and then everything worked fine.

提交回复
热议问题