I am trying to use Django rss feeds to view feeds on rss viewer app.
i used from django.contrib.syndication.views import Feed
to create rss feeds
but it only had 3 fields title, description and link
i added custom fields by using from django.utils.feedgenerator import Rss201rev2Feed
and it generates the extra fields with no issues
but when i open it with a rss viewer it doesn't show those extra fields or the image
My question is how can i make those extra fields show up in app ?
does it not show up because app only shows title, description and link and those other fields are not processed ?
so how can i embed image and other fields in description so it shows up (most importantly image show up) ?
i have went over documentation many times can't seem to get it right.
here is the view code from Django app
class CustomFeedGenerator(Rss201rev2Feed):
def add_item_elements(self, handler, item):
super(CustomFeedGenerator, self).add_item_elements(handler, item)
handler.addQuickElement(u"image", item['image'])
handler.addQuickElement(u"seller_name", item['seller_name'])
handler.addQuickElement(u"price", item['price'])
class LatestPostsFeed(Feed):
title = "www.marktplaats.nl"
link = "/feeds/"
description = "Updates on changes and additions to posts published in the starter."
feed_type = CustomFeedGenerator
def items(self):
return Check_Ads_One.objects.order_by('title')[:5]
def item_title(self, item):
return item.title
def item_description(self, item):
return item.paragraph
def item_link(self, item):
return item.prod_link
def item_extra_kwargs(self, item):
return { 'image': item.image_link,
'seller_name' : item.seller_name,
'price': item.price,}
I'm using Rss Savvy for the reader app