diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-02-17 01:38:03 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-02-17 01:38:03 +0000 |
| commit | 892202b3195a9903dd7328acf9f2920719000be2 (patch) | |
| tree | f2a8dc24a71b9677d2c4baed85680d953b9d04dd | |
| parent | 440d318d86946a4faf98400099939fbab37674cc (diff) | |
Added workaround for loading duplicate model classes in management shell. 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
| -rw-r--r-- | django/core/management.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/core/management.py b/django/core/management.py index 5e7ae0875b..ae610e696d 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -1174,6 +1174,11 @@ createcachetable.args = "[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() + try: if use_plain: # Don't bother loading IPython, because the user wants plain Python. |
