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
This commit is contained in:
Adrian Holovaty 2006-02-28 14:15:37 +00:00
parent 4b0acfc202
commit bd5a98c93f
1 changed files with 1 additions and 1 deletions

View File

@ -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})