54
54
'url': self._branch.context_url,
56
56
vals.update(templatefunctions)
57
del response.headers['Content-Type']
58
vals.update(self.get_values(h, args, kw, response))
58
vals.update(self.get_values(h, args, kw, headers))
60
60
self.log.info('Getting information for %s: %r secs' % (
61
61
self.__class__.__name__, time.time() - z,))
62
if 'Content-Type' not in response.headers:
63
response.headers['Content-Type'] = 'text/html'
62
if 'Content-Type' not in headers:
63
headers['Content-Type'] = 'text/html'
64
writer = start_response("200 OK", headers.items())
64
65
template = load_template(self.template_path)
66
template.expand_into(response, **vals)
67
self.log.info('Rendering %s: %r secs' % (
68
self.__class__.__name__, time.time() - z,))
70
def write(self, data):
71
self.bytes += len(data)
74
template.expand_into(w, **vals)
75
self.log.info('Rendering %s: %r secs, %s bytes' % (
76
self.__class__.__name__, time.time() - z, w.bytes))