报错RuntimeError: Model class apps.user.models.User doesn't declare an explicit app_label and isn&

【报错RuntimeError: Model class apps.user.models.User doesn' t declare an explicit app_label and isn&】赋料扬雄敌,诗看子建亲。这篇文章主要讲述报错RuntimeError: Model class apps.user.models.User doesn' t declare an explicit app_label and isn&相关的知识,希望能为你提供帮助。

运行环境 PyCharm 2017.1 Django 2.0.1 python 3.6.1使用相对路径引用Models模块 from .models import * 1 在同时存在多个apps的情况下,有机会报错RuntimeError: Model class app_anme.models.Ad doesn' t declare an explicit app_label and isn' t in an application in INSTALLED_APPS. 1 解决办法 使用绝对路径引用 以后不能采用点的方式了from app_name.models import * ————————————————


    推荐阅读