Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit bd5a98c93f0537c8b8ef688d3301b14a0d0092ce 1 parent 4b0acfc
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/models/base.py
View
2  django/db/models/base.py
@@ -28,7 +28,7 @@ def __new__(cls, name, bases, attrs):
# 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})
Please sign in to comment.
Something went wrong with that request. Please try again.