RemovedInDjango19Warning: Model doesn't declare an explicit app_label

后端 未结 2 1301
旧巷少年郎
旧巷少年郎 2021-01-04 18:39

Have gone through

Django 1.9 deprecation warnings app_label

but answers couldn\'t fix my problem, so asking again.

I have an app that is added to IN

2条回答
  •  伪装坚强ぢ
    2021-01-04 19:22

    I experienced this issue when running tests and it was simply a matter of changing:

    from .models import MyModel
    

    to

    from apps.myapp.models import MyModel
    

提交回复
热议问题