1
from django.contrib.syndication.feeds import Feed
2
from django.utils.feedgenerator import Atom1Feed
3
from django.core.urlresolvers import reverse
4
from django.utils.translation import ugettext_lazy as _
6
from pybb.models import Post, Topic
12
return reverse('pybb_index')
14
def item_guid(self, obj):
17
def item_pubdate(self, obj):
20
class LastPosts(PybbFeed):
21
title = _('Latest posts on forum')
22
description = _('Latest posts on forum')
23
title_template = 'pybb/feeds/posts_title.html'
24
description_template = 'pybb/feeds/posts_description.html'
27
return Post.objects.order_by('-created')[:15]
30
class LastTopics(PybbFeed):
31
title = _('Latest topics on forum')
32
description = _('Latest topics on forum')
33
title_template = 'pybb/feeds/topics_title.html'
34
description_template = 'pybb/feeds/topics_description.html'
37
return Topic.objects.order_by('-created')[:15]