1 from django.contrib.syndication.feeds import Feed
2 from django.utils.feedgenerator import Atom1Feed
3 from blog.models import BlogEntry
4 from django.conf import settings
6 class LatestBlogEntries(Feed):
8 title = settings.BLOG_TITLE
9 description = u'Updates on %s' %(title,)
10 link = settings.BLOG_ROOT
12 title_template = 'blog/feeds/title.html'
13 description_template = 'blog/feeds/description.html'
17 return BlogEntry.objects.all().order_by('-publish_date')[:20]
19 return BlogEntry.objects.all().order_by('-publish_date')
21 def author_name(self, obj):
24 def author_email(self, obj):
25 return "iDunno@sommitrealweird.co.uk"
27 def item_pubdate(self, obj):
28 return obj.publish_date