Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a way to generate thread data for rss #1

Open
chaws opened this issue Oct 8, 2015 · 0 comments
Open

Find a way to generate thread data for rss #1

chaws opened this issue Oct 8, 2015 · 0 comments

Comments

@chaws
Copy link
Contributor

chaws commented Oct 8, 2015

On colab/rss/feeds.py:
class LatestThreadsFeeds(Feed):
title = _(u'Latest Discussions')
link = '/rss/threads/latest/'

def items(self):
return Thread.objects.all()[:20]

def item_link(self, item):
return item.latest_message.url

def item_title(self, item):
title = '[' + item.mailinglist.name + '] '
title += item.latest_message.subject_clean
return title

def item_description(self, item):
return item.latest_message.body

class HottestThreadsFeeds(Feed):
title = _(u'Discussions Most Relevance')
link = '/rss/threads/hottest/'

def items(self):
return Thread.highest_score.all()[:20]

Thread comes from super_archives. figure out a way of doing with plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant