This is follow up to the question from here bozo_exception in Django / feedparser
I would like to iterate through many feeds from models/DB and have each of them displayed in the html template. While I do understand that I need to iterate thought x.feed.entries in the html template, I assume that iteration through each rss source needs to happen in the view function correct?
def feed5(request):
source = Feed.objects.all()
for item in source.url:
rss = feedparser.parse(item)
context = {'rss': rss,}
return render(request, 'feedreader/feed5.html', context)
gives me this error: 'QuerySet' object has no attribute 'url'. Not sure how should I go about it?
thanks
{{ rss.feed.title }}
{% for r in rss.entries|slice:":15" %}- {{ r.title }}
{% endfor %}
` but the page displays rss entries only from one source and ignores skips all others from DB. Why? – sikor Sep 29 '13 at 14:21{{ r.description|striptags }}