aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@animus.robocracy.org>2009-04-05 16:18:52 -0700
committerBryan Newbold <bnewbold@animus.robocracy.org>2009-04-05 16:18:52 -0700
commit6130561fe58d693d2d8fec500cf4733f33099ce9 (patch)
treee17a9080768aeecf0fc88ba1187781096b1917ce /bn_django
parent7abb2d0bad89938ef63585cd4e412fabb4d844f3 (diff)
downloadbnewnet-6130561fe58d693d2d8fec500cf4733f33099ce9.tar.gz
bnewnet-6130561fe58d693d2d8fec500cf4733f33099ce9.zip
feeds pubdate, might not work?
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 }