Ticket #10470: thread-safe-handlers.diff
File thread-safe-handlers.diff, 2.4 KB (added by , 16 years ago) |
---|
-
django/core/handlers/base.py
24 24 """ 25 25 from django.conf import settings 26 26 from django.core import exceptions 27 self._request_middleware = []28 self._view_middleware = []29 self._response_middleware = []30 self._exception_middleware = []27 _request_middleware = [] 28 _view_middleware = [] 29 _response_middleware = [] 30 _exception_middleware = [] 31 31 for middleware_path in settings.MIDDLEWARE_CLASSES: 32 32 try: 33 33 dot = middleware_path.rindex('.') … … 49 49 continue 50 50 51 51 if hasattr(mw_instance, 'process_request'): 52 self._request_middleware.append(mw_instance.process_request)52 _request_middleware.append(mw_instance.process_request) 53 53 if hasattr(mw_instance, 'process_view'): 54 self._view_middleware.append(mw_instance.process_view)54 _view_middleware.append(mw_instance.process_view) 55 55 if hasattr(mw_instance, 'process_response'): 56 self._response_middleware.insert(0, mw_instance.process_response)56 _response_middleware.insert(0, mw_instance.process_response) 57 57 if hasattr(mw_instance, 'process_exception'): 58 self._exception_middleware.insert(0, mw_instance.process_exception)58 _exception_middleware.insert(0, mw_instance.process_exception) 59 59 60 self._view_middleware = _view_middleware 61 self._response_middleware = _response_middleware 62 self._exception_middleware = _exception_middleware 63 64 # this must be last because __call__ in the child class 65 # will test it to know if load_middleware is complete 66 self._request_middleware = _request_middleware 67 60 68 def get_response(self, request): 61 69 "Returns an HttpResponse object for the given HttpRequest" 62 70 from django.core import exceptions, urlresolvers -
AUTHORS
449 449 Mykola Zamkovoi <nickzam@gmail.com> 450 450 Jarek Zgoda <jarek.zgoda@gmail.com> 451 451 Cheng Zhang 452 Travis Terry <tdterry7@gmail.com> 452 453 453 454 A big THANK YOU goes to: 454 455