Ticket #1796: new_management.patch

File new_management.patch, 753 bytes (added by Benjamin Slavin, 17 years ago)

Patch updated so it can be applied from the root SVN directory.

  • django/core/management.py

    11751175def run_shell(use_plain=False):
    11761176    "Runs a Python interactive interpreter. Tries to use IPython, if it's available."
     1177    # Force loading all the models in the installed apps. Otherwise, we
     1178    # can get into some weird problems where many_to_many relations fail because
     1179    # field options differ (perhaps due to permisions):
     1180    from django.db.models.loading import get_models
     1181    loaded_models = get_models()
    11771183    try:
    11781184        if use_plain:
    11791185            # Don't bother loading IPython, because the user wants plain Python.
Back to Top