Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Added workaround for loading duplicate model classes in management sh…

…ell. Patch

from Curtis Thompson and Benjamin Slavin. Refs #1796.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 440d318 commit 892202b3195a9903dd7328acf9f2920719000be2 @malcolmt malcolmt committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 django/core/
5 django/core/
@@ -1174,6 +1174,11 @@ def createcachetable(tablename):
def run_shell(use_plain=False):
"Runs a Python interactive interpreter. Tries to use IPython, if it's available."
+ # XXX: (Temporary) workaround for ticket #1796: force early loading of all
+ # models from installed apps.
+ from django.db.models.loading import get_models
+ loaded_models = get_models()
if use_plain:
# Don't bother loading IPython, because the user wants plain Python.

0 comments on commit 892202b

Please sign in to comment.
Something went wrong with that request. Please try again.