#NEWLINE# def is_active( self , obj ) : #NEWLINE# #INDENT# if active_till . disabled : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# now = timezone . now ( ) #NEWLINE# active_from = ( ( not obj . active_from ) or ( obj . active_from <= now ) ) #NEWLINE# active_till = ( ( not obj . active_till ) or ( obj . active_till > now ) ) #NEWLINE# return ( active_from and active_till )