Hello,
I'm trying to generate a custom feed since I need both the summary and
content elements in a certain Atom Feed. I have therefore created a
feeds.py where I import all the needed stuff (omitted) and then I
create a CustomFeed class like this:
class CustomFeed(Atom1Feed):
def add_item_elements(self, handler, item):
super(CustomFeed, self).add_item_elements(handler, item)
handler.addQuickElement(u'content', u'bar', {u'type': u'html'})
Then I use this CustomFeed in my LatestArticlesFeed class (feed_type =
CustomFeed).
So far so good, this works just fine and adds <content>bar</content>
to every item element in my Atom Feed. However I obviously need
content to be set based on item.content -- how do I do so? I can't
use
handler.addQuickElement(u'content', item['content'], {u'type':
u'html'})
since content is not defined in django.utils.feedgenerator.
Unfortunatly the custom feed generation doesn't seem to be a very
discussed subject, I tried looking on the list and on the web but I
haven't be able to find any real word example. Any help (or link)
would be very appreciated.
Thank,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---