Recently i've found that fucntion webhelpers.feedgenerator.write_items
throws exception when I trying to generate RSS feed (but atom feed
generates perfectly)

Next I've found that self.items dict must contain 'source' and
'generator' keys which are missing.

So, correct add_items routine should look like this:

    def add_item(self, title, link, description, author_email=None,
        author_name=None, author_link=None, pubdate=None,
comments=None,
        unique_id=None, enclosure=None, categories=(),
item_copyright=None, ttl=None,
        generator = None, source = None):
        """
        Adds an item to the feed. All args are expected to be Python
Unicode
        objects except pubdate, which is a datetime.datetime object,
and
        enclosure, which is an instance of the Enclosure class.

        """
        self.items.append({
            'title': title,
            'link': iri_to_uri(link),
            'description': description,
            'author_email': author_email,
            'author_name': author_name,
            'author_link': author_link,
            'pubdate': pubdate,
            'comments': comments,
            'unique_id': unique_id,
            'enclosure': enclosure,
            'categories': categories or (),
            'generator': generator,
            'source': source,
            'item_copyright': item_copyright,
            'ttl': ttl,
        })

Am I right?

--

You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


Reply via email to