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

后端 未结 6 806
甜味超标
甜味超标 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:29

    Because You have ForeignKey in operations, You must add a ook to dependencies:

    dependencies = [
        ('ook', '__first__'),
        ('eek', '0002_auto_20151029_1040'),
    ]
    

    Django migrations have two "magic" values:

    • __first__ - get module first migration
    • __latest__ - get module latest migration

提交回复
热议问题