From bd5a98c93f0537c8b8ef688d3301b14a0d0092ce Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 28 Feb 2006 14:15:37 +0000 Subject: [PATCH] magic-removal: Fixed #1413 -- Fixed error message when a model isn't in INSTALLED_APPS. Thanks, akaihola git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2438 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/base.py b/django/db/models/base.py index 1ec73209d8..29636c8eb8 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -28,7 +28,7 @@ class ModelBase(type): # Raise ImportError if this model isn't in INSTALLED_APPS. if re.sub('\.models$', '', mod) not in settings.INSTALLED_APPS: - raise ImportError, "INSTALLED_APPS must contain %r in order for you to use this model." % mod + raise ImportError, "INSTALLED_APPS must contain %r in order for you to use this model." % re.sub('\.models$', '', mod) # Create the class. new_class = type.__new__(cls, name, bases, {'__module__': mod})