Django 1.9 deprecation warnings app_label

后端 未结 12 741
花落未央
花落未央 2020-12-01 05:09

I\'ve just updated to Django v1.8, and testing my local setup before updating my project and I\'ve had a deprecation warning that I\'ve never seen before, nor does it make a

12条回答
  •  情书的邮戳
    2020-12-01 05:43

    I faced this issue as well and it was related to the way I was loading the signals.py module from an app.

    As you may now, it's quite common to have circular import issues between the signals and the models, and it's usual to import them from the app's __init__.py file or from the bottom of the models.py file to avoid them.

    Well, I was using the __init__.py approach, and just moving the import signals statement to the bottom of my models.py file solved the issue.

    Hope this helps someone else!

提交回复
热议问题