From f44c4a5d0f09367ccc032f77accc7826cc4d12e9 Mon Sep 17 00:00:00 2001 From: Paul McMillan Date: Thu, 22 Sep 2011 05:10:52 +0000 Subject: [PATCH] Fixed #7198 -- Improved error message when missing models.py. Thanks Silver_Ghost and for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16876 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/loading.py | 1 + 1 file changed, 1 insertion(+) diff --git a/django/db/models/loading.py b/django/db/models/loading.py index 03cdcc23e7..8d673c4778 100644 --- a/django/db/models/loading.py +++ b/django/db/models/loading.py @@ -146,6 +146,7 @@ class AppCache(object): if mod is None: if emptyOK: return None + raise ImproperlyConfigured("App with label %s is missing a models.py module.") else: return mod raise ImproperlyConfigured("App with label %s could not be found" % app_label)