Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #1376 -- Undid [2358], which broke flatpages. Thanks, Tom Tobin

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2364 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f86004a4d3f642463a6faac72a72b61e975d9f29 1 parent c72afb8
Adrian Holovaty authored February 20, 2006
4  django/core/handlers/base.py
@@ -86,10 +86,6 @@ def get_response(self, path, request):
86 86
             if response is None:
87 87
                 raise ValueError, "The view %s.%s didn't return an HttpResponse object." % (callback.__module__, callback.func_name)
88 88
 
89  
-            # Apply response middleware
90  
-            for middleware_method in self._response_middleware:
91  
-                response = middleware_method(request, response)
92  
-
93 89
             return response
94 90
         except exceptions.Http404, e:
95 91
             if DEBUG:
4  django/core/handlers/modpython.py
@@ -144,6 +144,10 @@ def __call__(self, req):
144 144
         finally:
145 145
             db.db.close()
146 146
 
  147
+        # Apply response middleware
  148
+        for middleware_method in self._response_middleware:
  149
+            response = middleware_method(request, response)
  150
+
147 151
         # Convert our custom HttpResponse object back into the mod_python req.
148 152
         populate_apache_request(response, req)
149 153
         return 0 # mod_python.apache.OK
4  django/core/handlers/wsgi.py
@@ -160,6 +160,10 @@ def __call__(self, environ, start_response):
160 160
         finally:
161 161
             db.db.close()
162 162
 
  163
+        # Apply response middleware
  164
+        for middleware_method in self._response_middleware:
  165
+            response = middleware_method(request, response)
  166
+
163 167
         try:
164 168
             status_text = STATUS_CODE_TEXT[response.status_code]
165 169
         except KeyError:

0 notes on commit f86004a

Please sign in to comment.
Something went wrong with that request. Please try again.