Refs #24829 -- Removed TemplateResponse rendering in BaseHandler.get_response().

Obsolete since 742ea51413.
This commit is contained in:
Tim Graham 2018-11-20 11:02:49 -05:00
parent 3529d0eabf
commit bff5ccff75
1 changed files with 0 additions and 9 deletions

View File

@ -72,23 +72,14 @@ class BaseHandler:
"""Return an HttpResponse object for the given HttpRequest."""
# Setup default url resolver for this thread
set_urlconf(settings.ROOT_URLCONF)
response = self._middleware_chain(request)
response._closable_objects.append(request)
# If the exception handler returns a TemplateResponse that has not
# been rendered, force it to be rendered.
if not getattr(response, 'is_rendered', True) and callable(getattr(response, 'render', None)):
response = response.render()
if response.status_code >= 400:
log_response(
'%s: %s', response.reason_phrase, request.path,
response=response,
request=request,
)
return response
def _get_response(self, request):