Ticket #1796: ticket-1796-fastcgi.diff

File ticket-1796-fastcgi.diff, 1.1 KB (added by mir@…, 18 years ago)

Patch for fastcgi

  • django/core/management.py

    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):  
    12901290        translation.activate(settings.LANGUAGE_CODE)
    12911291    except AttributeError:
    12921292        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()
    12931297    from django.core.servers.fastcgi import runfastcgi
    12941298    runfastcgi(args)
    12951299runfcgi.args = '[various KEY=val options, use `runfcgi help` for help]'
Back to Top