From nobody Mon Sep 17 00:00:00 2001
From: Michael Radziej <mir@noris.de>
Date: Wed Apr 25 16:37:21 2007 +0200
Subject: [PATCH] load all models
Workaround for Django ticket #1796, force early loading of
all models.
---
django/core/management.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
base 877629a28645b5e37730e7f630454b14193600ff
last 9d55bc656da27693b589cbf46a127a129a5d5248
diff --git a/django/core/management.py b/django/core/management.py
index bfc7c577021114ae7ba86e6a0499be559a8f0683..704b998315e9edd0c087339a1c29897163887ae1 100644
a
|
b
|
def runfcgi(args):
|
1290 | 1290 | translation.activate(settings.LANGUAGE_CODE) |
1291 | 1291 | except AttributeError: |
1292 | 1292 | pass |
| 1293 | # (Temporary) workaround for ticket #1796: force early loading of all |
| 1294 | # models from installed apps. |
| 1295 | from django.db.models.loading import get_models |
| 1296 | loaded_models = get_models() |
1293 | 1297 | from django.core.servers.fastcgi import runfastcgi |
1294 | 1298 | runfastcgi(args) |
1295 | 1299 | runfcgi.args = '[various KEY=val options, use `runfcgi help` for help]' |