# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1237803985 -3600 # Node ID 43bf9a74296109a8f7e1f78eca86c9bb4ade9f8d # Parent 5548b608b7d929b6cfe88a646152c2956e7bca77# Parent 894685124c68fcefd6317f95fe3b4a4ebb7f5e5b merge diff -r 5548b608b7d9 -r 43bf9a742961 sobjects/notification.py --- a/sobjects/notification.py Mon Mar 23 11:26:09 2009 +0100 +++ b/sobjects/notification.py Mon Mar 23 11:26:25 2009 +0100 @@ -160,8 +160,8 @@ def context(self, **kwargs): entity = self.entity(0, 0) for key, val in kwargs.iteritems(): - if val and val.strip(): - kwargs[key] = self.req._(val) + if val and isinstance(val, unicode) and val.strip(): + kwargs[key] = self.req._(val) kwargs.update({'user': self.user_login(), 'eid': entity.eid, 'etype': entity.dc_type(), diff -r 5548b608b7d9 -r 43bf9a742961 web/views/baseviews.py --- a/web/views/baseviews.py Mon Mar 23 11:26:09 2009 +0100 +++ b/web/views/baseviews.py Mon Mar 23 11:26:25 2009 +0100 @@ -681,10 +681,9 @@ """display a list of entities by calling their view""" req = self.req self.w(u'\n' % req.encoding) - self.w(u'''''') self.w(u' \n' % html_escape(req.url())) self.w(u' %s RSS Feed\n' % html_escape(self.page_title())) @@ -701,8 +700,7 @@ self.w(u' \n') for i in xrange(self.rset.rowcount): self.cell_call(i, 0) - self.w(u'') - + self.w(u'') class RssItemView(EntityView): id = 'rssitem' @@ -711,24 +709,29 @@ def cell_call(self, row, col): entity = self.complete_entity(row, col) self.w(u'\n' % html_escape(entity.absolute_url())) + self.render_title_link(entity) + self._marker('description', entity.dc_date(self.description)) + self._marker('dc:date', entity.dc_date(self.date_format)) + self.render_entity_creator(entity) + self.w(u'\n') + + def render_title_link(self, entity): self._marker('title', entity.dc_long_title()) self._marker('link', entity.absolute_url()) - self._marker('description', entity.dc_description()) - self._marker('dc:date', entity.dc_date(self.date_format)) + + def render_entity_creator(self, entity): if entity.creator: self.w(u'') self._marker('name', entity.creator.name()) email = entity.creator.get_email() if email: self._marker('email', email) - self.w(u'') - self.w(u'\n') + self.w(u'') def _marker(self, marker, value): if value: self.w(u' <%s>%s\n' % (marker, html_escape(value), marker)) - class CSVMixIn(object): """mixin class for CSV views""" templatable = False