#NEWLINE# @ classmethod #NEWLINE# def _visible_query( cls , **query_kwargs ) : #NEWLINE# #INDENT# 'Return visible announcements given a group query.' #NEWLINE# return Announcement . objects . filter ( ( Q ( show_after__lt = datetime . now ( ) ) & ( Q ( show_until__gt = datetime . now ( ) ) | Q ( show_until__isnull = True ) ) ) , ** query_kwargs )