def ShowUpdateItems(request): output = "" feeds = feedDB.objects.all() for feed in feeds: parse = feedparser.parse(feed.url) output += """ <h1>%s</h1> <h2><a href="%s" target="_blank">Feed Link</a></h2> """ % (feed.keyword , feed.url) for entry in parse['entries']: hash = calculate_checksum(entry.title + entry.summary + entry.link) output += """ <style> div { border: 3px ridge; margin:15px; } </style> <div> Title : <p><a href="%s" target="_blank"> %s </a></p> Summary : <p> %s </p> Hash: <p> %s </p> </div> """ % (entry.link , entry.title , entry.summary , hash) return HttpResponse(output)
def save(self): from FeedPaper.FP.controllers import calculate_checksum self.checksum = calculate_checksum(self.title + self.description + self.link_url) super ( itemDB , self ).save()
def save(self): from FeedPaper.FP.controllers import calculate_checksum self.checksum = calculate_checksum(self.keyword + self.url ) super(feedDB , self).save()