<s> from datetime import datetime <EOL> from django . contrib . syndication . views import Feed <EOL> from django . core . urlresolvers import reverse_lazy <EOL> from django . shortcuts import get_object_or_404 <EOL> from django . utils . feedgenerator import ( <EOL> Atom1Feed , Rss201rev2Feed ) <EOL> from . models import Startup <EOL> class BaseStartupFeedMixin ( ) : <EOL> def description ( self , startup ) : <EOL> return "<STR_LIT>" . format ( <EOL> startup . name ) <EOL> def get_object ( self , request , startup_slug ) : <EOL> return get_object_or_404 ( <EOL> Startup , <EOL> slug__iexact = startup_slug ) <EOL> def items ( self , startup ) : <EOL> return startup . newslink_set . all ( ) [ : <NUM_LIT:10> ] <EOL> def item_description ( self , newslink ) : <EOL> return newslink . description ( ) <EOL> def item_link ( self , newslink ) : <EOL> return newslink . link <EOL> def item_title ( self , newslink ) : <EOL> return newslink . title <EOL> def link ( self , startup ) : <EOL> return startup . get_absolute_url ( ) <EOL> def subtitle ( self , startup ) : <EOL> return self . description ( startup ) <EOL> def title ( self , startup ) : <EOL> return startup . name <EOL> class AtomStartupFeed ( BaseStartupFeedMixin , Feed ) : <EOL> feed_type = Atom1Feed <EOL> class Rss2StartupFeed ( BaseStartupFeedMixin , Feed ) : <EOL> feed_type = Rss201rev2Feed </s>
