Re: Custom feed generator

2008-11-14 Thread timc3
To answer my own question: class MediaRSS(Rss201rev2Feed): def root_attributes(self): attrs = super(MediaRSS, self).root_attibutes() attrs['xmlns:media'] = 'http://search.yahoo.com/mrss/' return attrs --~--~-~--~~~---~--~~ You received

Re: Custom feed generator

2008-11-14 Thread timc3
Thanks for that! Has got me to at least display a feed: class MediaRSS(Rss201rev2Feed): def root_attibutes(self): attrs = super(MediaRSS, self).root_attibutes() attrs['xmlns:media'] = 'http://search.yahoo.com/mrss/' return attrs def add_root_elements(self

Re: Custom feed generator

2008-11-14 Thread Malcolm Tredinnick
On Fri, 2008-11-14 at 23:38 +1100, Malcolm Tredinnick wrote: [...] > Something with a get_object() method should be a subclass of > django.contrib.syndication.feeds.Feed. That class has a feed_generator > attribute which will be where your MediaRSS class goes. Err ... feed_type, not feed_generat

Re: Custom feed generator

2008-11-14 Thread Malcolm Tredinnick
On Fri, 2008-11-14 at 04:22 -0800, timc3 wrote: > > Or explaining what is going wrong. :-) > > > > Care to give us a few clues as to the problems you're seeing? On the > > surface, your class looks fairly much correct. > > ha ha!! Yes of course this is the message that I am getting: > > File "/

Re: Custom feed generator

2008-11-14 Thread timc3
> Or explaining what is going wrong. :-) > > Care to give us a few clues as to the problems you're seeing? On the > surface, your class looks fairly much correct. ha ha!! Yes of course this is the message that I am getting: File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ s

Re: Custom feed generator

2008-11-14 Thread Malcolm Tredinnick
On Fri, 2008-11-14 at 02:55 -0800, timc3 wrote: > Has anyone got an example of a custom feed generator? > > I am trying to create one and but I don't seem to be overriding the > correct methods: Or explaining what is going wrong. :-) Care to give us a few clues as to the problems you're seeing