#NEWLINE# def formatday( self , day , weekday ) : #NEWLINE# #INDENT# 'Return a day as a table cell.' #NEWLINE# super ( EventCalendar , self ) . formatday ( day , weekday ) #NEWLINE# now = get_now ( ) #NEWLINE# self . day = day #NEWLINE# out = '' #NEWLINE# if ( day == 0 ) : #NEWLINE# #INDENT# return '<td class="noday">&nbsp;</td>' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( now . month == self . mo ) and ( now . year == self . yr ) and ( day == now . day ) ) : #NEWLINE# #INDENT# if ( day in self . count ) : #NEWLINE# #INDENT# out = ( self . wkday_today + self . anch ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( ( self . wkday_today + self . anch ) + self . end ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( day in self . count ) : #NEWLINE# #INDENT# out = ( self . wkday_not_today + self . anch ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( ( self . wkday_not_today + self . anch ) + self . end ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# detail = "%s%s%s<br><a href='%s'>View details</a>" #NEWLINE# extras = '<div title="%s" data-content="%s" data-container="body" data-toggle="popover" class="calendar-event"%s>' #NEWLINE# common = ' style=background:%s;color:%s;' #NEWLINE# for item in self . count [ day ] : #NEWLINE# #INDENT# self . pk = item [ 1 ] #NEWLINE# self . title = item [ 0 ] #NEWLINE# for event in self . events : #NEWLINE# #INDENT# if ( event . pk == self . pk ) : #NEWLINE# #INDENT# self . event = event #NEWLINE# self . check_if_cancelled ( ) #NEWLINE# self . popover_helper ( ) #NEWLINE# ( bg , fnt ) = self . event . get_colors ( ) #NEWLINE# #UNINDENT# #UNINDENT# out += ( ( ( ( ( '<a class="event-anch" href="' + self . event_url ) + '">' ) + ( extras % ( self . title , ( detail % ( self . when , self . where , self . desc , self . event_url ) ) , ( common % ( bg , fnt ) ) ) ) ) + self . title2 ) + '</div></a>' ) #NEWLINE# #UNINDENT# return ( out + self . end )