diff -r 495862266785 -r 6b46d73823f5 web/views/idownloadable.py --- a/web/views/idownloadable.py Wed Sep 23 19:26:38 2009 +0200 +++ b/web/views/idownloadable.py Wed Sep 23 19:40:19 2009 +0200 @@ -50,7 +50,7 @@ order = 10 def cell_call(self, row, col, title=None, label=None, **kwargs): - entity = self.rset.get_entity(row, col) + entity = self.cw_rset.get_entity(row, col) download_box(self.w, entity, title, label) @@ -75,7 +75,7 @@ encoding = None else: contenttype = entity.download_content_type() - self.req.set_content_type(contenttype or self.content_type, + self._cw.set_content_type(contenttype or self.content_type, filename=entity.download_file_name(), encoding=encoding) @@ -91,7 +91,7 @@ def cell_call(self, row, col, title=None, **kwargs): - entity = self.rset.get_entity(row, col) + entity = self.cw_rset.get_entity(row, col) url = xml_escape(entity.download_url()) self.w(u'%s' % (url, xml_escape(title or entity.dc_title()))) @@ -106,14 +106,14 @@ if contenttype.startswith('image/'): self.wview('image', entity.rset, row=entity.row) else: - self.wview('downloadlink', entity.rset, title=self.req._('download'), row=entity.row) + self.wview('downloadlink', entity.rset, title=self._cw._('download'), row=entity.row) try: if ENGINE.has_input(contenttype): self.w(entity.printable_value('data')) except TransformError: pass except Exception, ex: - msg = self.req._("can't display data, unexpected error: %s") % ex + msg = self._cw._("can't display data, unexpected error: %s") % ex self.w('