Loading django/db/models/base.py +3 −3 Original line number Diff line number Diff line Loading @@ -98,9 +98,9 @@ class ModelBase(type): if not abstract: raise RuntimeError( "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. " % (module, name)) "app_label and isn't in an application in " "INSTALLED_APPS." % (module, name) ) else: app_label = app_config.label Loading tests/runtests.py +1 −2 Original line number Diff line number Diff line Loading @@ -76,8 +76,7 @@ ALWAYS_MIDDLEWARE_CLASSES = [ # Need to add the associated contrib app to INSTALLED_APPS in some cases to # avoid "RuntimeError: Model class X 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." # and isn't in an application in INSTALLED_APPS." CONTRIB_TESTS_TO_APPS = { 'flatpages_tests': 'django.contrib.flatpages', 'redirects_tests': 'django.contrib.redirects', Loading Loading
django/db/models/base.py +3 −3 Original line number Diff line number Diff line Loading @@ -98,9 +98,9 @@ class ModelBase(type): if not abstract: raise RuntimeError( "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. " % (module, name)) "app_label and isn't in an application in " "INSTALLED_APPS." % (module, name) ) else: app_label = app_config.label Loading
tests/runtests.py +1 −2 Original line number Diff line number Diff line Loading @@ -76,8 +76,7 @@ ALWAYS_MIDDLEWARE_CLASSES = [ # Need to add the associated contrib app to INSTALLED_APPS in some cases to # avoid "RuntimeError: Model class X 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." # and isn't in an application in INSTALLED_APPS." CONTRIB_TESTS_TO_APPS = { 'flatpages_tests': 'django.contrib.flatpages', 'redirects_tests': 'django.contrib.redirects', Loading