#NEWLINE# def render( self , context ) : #NEWLINE# #INDENT# qs = Item . objects . all ( ) #NEWLINE# if self . start : #NEWLINE# #INDENT# start = self . resolve_date ( self . start , context ) #NEWLINE# end = self . resolve_date ( self . end , context ) #NEWLINE# if ( ( start is None ) or ( end is None ) ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# qs = qs . filter ( timestamp__range = ( start , end ) ) #NEWLINE# #UNINDENT# CT = ContentType . objects . get_for_model #NEWLINE# if self . oftypes : #NEWLINE# #INDENT# qs = qs . filter ( content_type__id__in = [ CT ( m ) . id for m in self . oftypes ] ) #NEWLINE# #UNINDENT# if self . excludetypes : #NEWLINE# #INDENT# qs = qs . exclude ( content_type__id__in = [ CT ( m ) . id for m in self . excludetypes ] ) #NEWLINE# #UNINDENT# if self . reversed : #NEWLINE# #INDENT# qs = qs . order_by ( 'timestamp' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# qs = qs . order_by ( '-timestamp' ) #NEWLINE# #UNINDENT# if start . limit : #NEWLINE# #INDENT# qs = qs [ : self . limit ] #NEWLINE# #UNINDENT# context [ self . asvar ] = list ( qs ) #NEWLINE# return ''