#NEWLINE# def filter_published( self , queryset ) : #NEWLINE# #INDENT# 'Filter the given pages :class:`QuerySet` to obtain only published\n        page.' #NEWLINE# if settings . PAGE_USE_SITE_ID : #NEWLINE# #INDENT# queryset = queryset . filter ( sites = global_settings . SITE_ID ) #NEWLINE# #UNINDENT# queryset = queryset . filter ( status = queryset . model . PUBLISHED ) #NEWLINE# if settings . PAGE_SHOW_START_DATE : #NEWLINE# #INDENT# queryset = queryset . filter ( publication_date__lte = get_now ( ) ) #NEWLINE# #UNINDENT# if settings . PAGE_SHOW_END_DATE : #NEWLINE# #INDENT# queryset = queryset . filter ( ( Q ( publication_end_date__gt = get_now ( ) ) | Q ( publication_end_date__isnull = True ) ) ) #NEWLINE# #UNINDENT# return queryset