Rather than use use gluon.serializers.rss, I am using
gluon.contrib.rss2 to attempt to add an enclosure to an rss feed:
http://code.google.com/p/publicradioroadtrip/source/browse/controllers/default.py?spec=svnd020b7842a1c0a9ba880fb5f94146bbb5ab55524r=d020b7842a1c0a9ba880fb5f94146bbb5ab55524#590
Got it! :)
stories = {}
collection_id=request.args(0)
collection = db.collection[collection_id] or redirect(error_page)
stories=db(db.story.collection.contains(collection_id)).select(orderby=db.story.title)
length=len(stories);
scheme = request.env.get('WSGI_URL_SCHEME',
No errors. The feed displays, but the enclosure and the comments tags
to do not appear.
If I call the function without the .rss at the end here is what I get:
http://pastie.textmate.org/1782979
Note that the enclosure and discussions fields are present.
If I call the same function using the
Enclosures are for including media (audio, video, etc) in a blog post and
should be optional. In general, the built-in gluon RSS stuff should work
without modofication.
Are you getting an error message? Or does your feed not work in a reader?
From a quick look at your code, it seems OK.
4 matches
Mail list logo