Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added workaround for loading duplicate model classes in management sh…

…ell. Patch

from Curtis Thompson and Benjamin Slavin. Refs #1796.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4533 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 892202b3195a9903dd7328acf9f2920719000be2 1 parent 440d318
Malcolm Tredinnick authored February 17, 2007

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  django/core/management.py
5  django/core/management.py
@@ -1174,6 +1174,11 @@ def createcachetable(tablename):
1174 1174
 
1175 1175
 def run_shell(use_plain=False):
1176 1176
     "Runs a Python interactive interpreter. Tries to use IPython, if it's available."
  1177
+    # XXX: (Temporary) workaround for ticket #1796: force early loading of all
  1178
+    # models from installed apps.
  1179
+    from django.db.models.loading import get_models
  1180
+    loaded_models = get_models()
  1181
+
1177 1182
     try:
1178 1183
         if use_plain:
1179 1184
             # Don't bother loading IPython, because the user wants plain Python.

0 notes on commit 892202b

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