Django

Code

Changeset 4533

Show
Ignore:
Timestamp:
02/16/07 19:38:03 (2 years ago)
Author:
mtredinnick
Message:

Added workaround for loading duplicate model classes in management shell. Patch
from Curtis Thompson and Benjamin Slavin. Refs #1796.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/management.py

    r4424 r4533  
    11751175def run_shell(use_plain=False): 
    11761176    "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 
    11771182    try: 
    11781183        if use_plain: