I am trying to display the result of my view function on a Django webpage but only get one line with no hyperlink.
code:
from django.http import HttpResponse
import feedparser
def index(content):
YahooContent = feedparser.parse ("http://news.yahoo.com/rss/")
for feed in YahooContent.entries:
content = (feed.title + ": " + "\n"+feed.link + "\n" + feed.published + "\n")
return HttpResponse(content)
Result on the webpage:
Man arrested in death of missing Ariz. girl: http://news.yahoo.com/arizona-girls-home-searched-body-found-154919366.html Thu, 04 Sep 2014 14:05:16 -0400