Django Generating RSS feed with description
Posted
by Issy
on Stack Overflow
See other posts from Stack Overflow
or by Issy
Published on 2010-04-22T12:35:32Z
Indexed on
2010/04/22
12:53 UTC
Read the original article
Hit count: 257
Hey Guys,
I am trying to generate a full rss feed, however when loading the feed in Mail, it just shows the title, with a read more link at the bottom. I have tried several different options. But none seem to work.
I would like to generate the feed with a combination of several feeds in my modl.
Here is the code i have tried:
class LatestEvents(Feed):
description_template = "events_description.html"
def title(self):
return "%s Events" % SITE.name
def link(self):
return '/events/'
def items(self):
events = list(Event.objects.all().order_by('-published_date')[:5])
return events
author_name = 'Latest Events'
def item_pubdate(self, item):
return item.published_date
And in my template which is stored in TEMPLATE_ROOT/feeds/
{{ obj.description|safe }}
<h1>Event Location Details</h1>
{{ obj.location|safe }}
Even if i hard code the description it does not work.
© Stack Overflow or respective owner