#NEWLINE# def get_events( request ) : #NEWLINE# #INDENT# 'Return a list of EventRenderers from available Liability' #NEWLINE# events = [ ] #NEWLINE# query = Q ( due_date__isnull = False ) #NEWLINE# liabilities = Object . filter_by_request ( request , manager = Liability . objects . filter ( query ) ) #NEWLINE# for liability in liabilities : #NEWLINE# #INDENT# if liability . due_date : #NEWLINE# #INDENT# old = liability . due_date #NEWLINE# new_due_date = datetime . datetime ( year = old . year , month = old . month , day = old . day , hour = 12 , minute = 0 , second = 0 ) #NEWLINE# event = EventRenderer ( liability . name , None , new_due_date , liability . get_absolute_url ( ) ) #NEWLINE# #UNINDENT# event . css_class += ' finance-calendar-liability' #NEWLINE# events . append ( event ) #NEWLINE# #UNINDENT# return events