这是我的代码在我signals.py
在信号导入模型引起Django的废弃警告app_label
from .models import Entry
@receiver(pre_save, sender=Entry)
def do_stuff(sender, instance, *args, **kwargs):
pass
现在,这个问题是有关
Django 1.9 deprecation warnings app_label
但我无法弄清楚,为什么我需要为此创建额外的类。
Warning:
Model class app.models.Entry doesn't declare an explicit app_label and either isn't in
an application in INSTALLED_APPS or else was imported before its application was loaded.
This will no longer be supported in Django 1.9.
如果我只是清空我的信号文件,那么没有警告。在这个问题
什么是*确切*警告你得到什么? –
@LegoStormtroopr我已更新我的问题 – user3214546
我回答了您链接到的问题,看看。 –