Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: 665f36d657
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (22 sloc) 0.993 kb
from django.contrib.syndication.feeds import Feed
from txts.models import Txt
from django.utils.feedgenerator import Atom1Feed
class TerraquisFeed (Feed):
'''Generic feed customized for site.'''
title = ""
link = "/blog/"
description = "De terricoles i xarxes."
feed_type = Atom1Feed
# We don't want items on feed's top each time it's modified.
def item_pubdate (self, item):
return item.pub_date
class BlogEntries (TerraquisFeed):
'''Feed all blog entries.'''
def items(self):
return Txt.public.filter(section__permalink='blog').order_by('-pub_date')[:15]
class OpenKnowledge (TerraquisFeed):
'''Feed blog entries from selected topics: Open source, CC, open science,...'''
def items(self):
selected_tags = ['codi-lliure','open-source','net']
return Txt.public.filter(section__permalink='blog'
Jump to Line
Something went wrong with that request. Please try again.