Loading django/db/models/base.py +9 −5 Original line number Diff line number Diff line Loading @@ -104,12 +104,16 @@ class ModelBase(type): # For 'django.contrib.sites.models', this would be 'sites'. # For 'geo.models.places' this would be 'geo'. warnings.warn( msg = ( "Model class %s.%s 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." % (module, name), PendingDeprecationWarning, stacklevel=2) "and either isn't in an application in INSTALLED_APPS or " "else was imported before its application was loaded. " % (module, name)) if abstract: msg += "Its app_label will be set to None in Django 1.9." else: msg += "This will no longer be supported in Django 1.9." warnings.warn(msg, PendingDeprecationWarning, stacklevel=2) model_module = sys.modules[new_class.__module__] package_components = model_module.__name__.split('.') Loading Loading
django/db/models/base.py +9 −5 Original line number Diff line number Diff line Loading @@ -104,12 +104,16 @@ class ModelBase(type): # For 'django.contrib.sites.models', this would be 'sites'. # For 'geo.models.places' this would be 'geo'. warnings.warn( msg = ( "Model class %s.%s 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." % (module, name), PendingDeprecationWarning, stacklevel=2) "and either isn't in an application in INSTALLED_APPS or " "else was imported before its application was loaded. " % (module, name)) if abstract: msg += "Its app_label will be set to None in Django 1.9." else: msg += "This will no longer be supported in Django 1.9." warnings.warn(msg, PendingDeprecationWarning, stacklevel=2) model_module = sys.modules[new_class.__module__] package_components = model_module.__name__.split('.') Loading