#2131: [patch] HttpResponseSendFile for serving static files handler-specific sendfile mechanism -----------------------------------------------+---------------------------- Reporter: ymasuda[at]ethercube.com | Owner: alsleme Status: new | Milestone: 1.1 beta Component: Core framework | Version: SVN Resolution: | Keywords: Stage: Accepted | Has_patch: 1 Needs_docs: 1 | Needs_tests: 1 Needs_better_patch: 1 | -----------------------------------------------+---------------------------- Comment (by mrts):
As for middleware, they can explicitly bypass `HttpResponseSendFile` responses as follows: {{{ def process_response(self, request, response): if isinstance(response, HttpResponseSendFile): return response }}} or the handlers can bypass `HttpResponseSendFile` implicitly in `__call__`: {{{ if not isinstance(response, HttpResponseSendFile): for middleware_method in self._response_middleware: response = middleware_method(request, response) }}} -- Ticket URL: <http://code.djangoproject.com/ticket/2131#comment:35> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---