Ticket #9805: reverse.diff

File reverse.diff, 1.5 KB (added by ElliottM, 16 years ago)

Patch that fixes the error

  • django/core/handlers/wsgi.py

     
    219219    def __call__(self, environ, start_response):
    220220        from django.conf import settings
    221221
     222        set_script_prefix(base.get_script_name(environ))
     223
    222224        # Set up middleware if needed. We couldn't do this earlier, because
    223225        # settings weren't available.
    224226        if self._request_middleware is None:
     
    228230                self.load_middleware()
    229231            self.initLock.release()
    230232
    231         set_script_prefix(base.get_script_name(environ))
    232233        signals.request_started.send(sender=self.__class__)
    233234        try:
    234235            try:
  • django/core/handlers/modpython.py

     
    186186        # that use settings now can work
    187187        from django.conf import settings
    188188
     189        set_script_prefix(req.get_options().get('django.root', ''))
     190
    189191        # if we need to set up middleware, now that settings works we can do it now.
    190192        if self._request_middleware is None:
    191193            self.load_middleware()
    192194
    193         set_script_prefix(req.get_options().get('django.root', ''))
     195
    194196        signals.request_started.send(sender=self.__class__)
    195197        try:
    196198            try:
Back to Top