<s> from django . contrib . syndication . views import Feed as SyndicationFeed <EOL> from django . core . urlresolvers import reverse <EOL> from django . conf import settings <EOL> from lifestream . models import Lifestream , Item <EOL> class RecentItemsFeed ( SyndicationFeed ) : <EOL> title = "<STR_LIT>" <EOL> description = "<STR_LIT>" <EOL> def link ( self , obj ) : <EOL> return reverse ( '<STR_LIT>' , kwargs = { <EOL> '<STR_LIT>' : obj . slug , <EOL> } ) <EOL> def get_object ( self , bits ) : <EOL> return Lifestream . objects . get ( slug = bits [ <NUM_LIT:0> ] ) <EOL> def items ( self , obj ) : <EOL> return Item . objects . published ( ) . filter ( feed__lifestream = obj ) [ : <NUM_LIT:10> ] <EOL> def item_pubdate ( self , item ) : <EOL> return item . date <EOL> def item_categories ( self , item ) : <EOL> def item_categories ( self , item ) : <EOL> if '<STR_LIT>' in settings . INSTALLED_APPS : <EOL> return [ tag . name for tag in item . tag_set ] <EOL> else : <EOL> return [ ] </s>
