Django

Code

Ticket #1796: modpython.patch

File modpython.patch, 0.7 kB (added by Ben Slavin <benjamin.slavin@gmail.com>, 1 year ago)

Patch to fix this in the modpython handler.

  • django/core/handlers/modpython.py

    old new  
    139139        # now that the environ works we can see the correct settings, so imports 
    140140        # that use settings now can work 
    141141        from django.conf import settings 
     142         
     143        # XXX: (Temporary) workaround for ticket #1796: force early loading of all 
     144        # models from installed apps. 
     145        from django.db.models.loading import get_models 
     146        loaded_models = get_models() 
    142147 
    143148        # if we need to set up middleware, now that settings works we can do it now. 
    144149        if self._request_middleware is None: