from django.contrib.syndication.feeds import Feed from models import Entry, MicroEntry, LinkArtifact class LatestEntries(Feed): title = "bnewbold.net journal entries" link = "/journal/entries/" description = " " def items(self): return Entry.objects.order_by('-date')[:5] class LatestMicroEntries(Feed): title = "bnewbold.net microentries" link = "/journal/microentries/" description = "Quick updates" def items(self): return MicroEntry.objects.order_by('-date')[:5] class LatestLinks(Feed): title = "bnewbold.net links" link = "/artifacts/links/" description = "Links to love" def items(self): return LinkArtifact.objects.order_by('-date')[:5] def item_link(self,item): return item.url feed_list = {'latest_entries':LatestEntries, 'latest_microentries':LatestMicroEntries, 'latest_links':LatestLinks }