Beispiel #1
0
    def get_item_value(self, resource, context, item, column, site_root):
        brain, item_resource = item
        if column == 'pubDate':
            if isinstance(item_resource, TagsAware):
                return brain.pub_datetime
            else:
                return brain.mtime
        elif column == 'title':
            # Special case for the title
            title = item_resource.get_title()
            # FIXME
            if brain.name == 'index':
                parent = item_resource.parent
                if isinstance(parent, Section):
                    title = parent.get_title()
            return title

        return BaseRSS.get_item_value(self, resource, context, item,
                                      column, site_root)
Beispiel #2
0
 def get_base_query(self, resource, context):
     query = BaseRSS.get_base_query(self, resource, context)
     query.append(PhraseQuery('workflow_state', 'public'))
     return query