#NEWLINE# def published( self , for_user = None , include_login_required = False ) : #NEWLINE# #INDENT# '\n        Override ``DisplayableManager.published`` to exclude\n        pages with ``login_required`` set to ``True``. if the\n        user is unauthenticated and the setting\n        ``PAGES_PUBLISHED_INCLUDE_LOGIN_REQUIRED`` is ``False``.\n\n        The extra ``include_login_required`` arg allows callers to\n        override the ``PAGES_PUBLISHED_INCLUDE_LOGIN_REQUIRED``\n        behaviour in special cases where they want to deal with the\n        ``login_required`` field manually, such as the case in\n        ``PageMiddleware``.\n        ' #NEWLINE# published = super ( PageManager , self ) . published ( for_user = for_user ) #NEWLINE# unauthenticated = ( for_user and ( not for_user . is_authenticated ( ) ) ) #NEWLINE# if ( published and ( not include_login_required ) and ( not settings . PAGES_PUBLISHED_INCLUDE_LOGIN_REQUIRED ) ) : #NEWLINE# #INDENT# published = published . exclude ( login_required = True ) #NEWLINE# #UNINDENT# return published