#NEWLINE# def with_bookmarks( self , user ) : #NEWLINE# #INDENT# if ( not user . is_authenticated ( ) ) : #NEWLINE# #INDENT# return self #NEWLINE# #UNINDENT# user_bookmarks = CommentBookmark . objects . filter ( user = user ) . select_related ( 'topic' ) #NEWLINE# prefetch = Prefetch ( 'commentbookmark_set' , queryset = user_bookmarks , to_attr = 'bookmarks' ) #NEWLINE# return self . prefetch_related ( prefetch )