aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django
diff options
context:
space:
mode:
Diffstat (limited to 'bn_django')
-rw-r--r--bn_django/journal/feeds.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/bn_django/journal/feeds.py b/bn_django/journal/feeds.py
index 3577c46..09f1a4e 100644
--- a/bn_django/journal/feeds.py
+++ b/bn_django/journal/feeds.py
@@ -10,6 +10,18 @@ class LatestEntries(Feed):
def items(self):
return Entry.objects.order_by('-date')[:5]
+ def item_link(self,item):
+ return "http://bnewbold.net%s" % item.get_absolute_url()
+
+ def item_author_name(self,item):
+ return item.author.username
+
+ def item_author_email(self,item):
+ return item.author.email
+
+ def item_pubdate(self,item):
+ return item.date
+
class LatestMicroEntries(Feed):
title = "bnewbold.net microentries"
link = "/journal/microentries/"
@@ -18,6 +30,18 @@ class LatestMicroEntries(Feed):
def items(self):
return MicroEntry.objects.order_by('-date')[:5]
+ def item_link(self,item):
+ return "http://bnewbold.net%s" % item.get_absolute_url()
+
+ def item_author_name(self,item):
+ return item.author.username
+
+ def item_author_email(self,item):
+ return item.author.email
+
+ def item_pubdate(self,item):
+ return item.date
+
class LatestLinks(Feed):
title = "bnewbold.net links"
link = "/artifacts/links/"
@@ -29,6 +53,15 @@ class LatestLinks(Feed):
def item_link(self,item):
return item.url
+ def item_author_name(self,item):
+ return item.author.username
+
+ def item_author_email(self,item):
+ return item.author.email
+
+ def item_pubdate(self,item):
+ return item.date
+
feed_list = {'latest_entries':LatestEntries,
'latest_microentries':LatestMicroEntries,
'latest_links':LatestLinks }