Turbogears since 0.9 has support for rss/atom feeds. Here is a quicklook on how to use them. Any suggestions are welcome.
We assume here that we have blog that we want to add a feed to.
First we need to create the feed object. Then we add a get_feed_data method to it. It is this that will be called to populate the feed everytime a user requests it.
now lets start adding some things to the feed. We do this by returning a dict from get_feed_data with the elements we wish to have
Now we need to get some elements for the posts in the feed so we extend our get_feed_data method for that.
Please note that each foo dictionary is populated with valid keys for atom/rss for a well form feeds but each entry object can be whatever you define, you can even populate it from diferent SQLObjects. So there is no need for you to know the definition of BlogEntry.
Now all we need is just to mount it in our controller
now we have serveral urls to use. (please note our blog is mounted as root)
Note: At this point the TG feed code has no knowledge of which elements are necessary to create valid feed. But this is something expected to be add in the near future. patches accepted :)