<s> from django . conf import settings <EOL> from django . contrib . syndication . feeds import Feed <EOL> from django . contrib . sites . models import Site <EOL> from django . contrib import comments <EOL> class LatestCommentFeed ( Feed ) : <EOL> """<STR_LIT>""" <EOL> def title ( self ) : <EOL> if not hasattr ( self , '<STR_LIT>' ) : <EOL> self . _site = Site . objects . get_current ( ) <EOL> return u"<STR_LIT>" % self . _site . name <EOL> def link ( self ) : <EOL> if not hasattr ( self , '<STR_LIT>' ) : <EOL> self . _site = Site . objects . get_current ( ) <EOL> return "<STR_LIT>" % ( self . _site . domain ) <EOL> def description ( self ) : <EOL> if not hasattr ( self , '<STR_LIT>' ) : <EOL> self . _site = Site . objects . get_current ( ) <EOL> return u"<STR_LIT>" % self . _site . name <EOL> def items ( self ) : <EOL> qs = comments . get_model ( ) . objects . filter ( <EOL> site__pk = settings . SITE_ID , <EOL> is_public = True , <EOL> is_removed = False , <EOL> ) <EOL> if getattr ( settings , '<STR_LIT>' , None ) : <EOL> where = [ '<STR_LIT>' ] <EOL> params = [ settings . COMMENTS_BANNED_USERS_GROUP ] <EOL> qs = qs . extra ( where = where , params = params ) <EOL> return qs . order_by ( '<STR_LIT>' ) [ : <NUM_LIT> ] <EOL> def item_pubdate ( self , item ) : <EOL> return item . submit_date </s>
