def get_queryset(self):
        """ Returns the list of items for this view. """
        # Determines the forums that can be accessed by the current user
        forums = self.request.forum_permission_handler.get_readable_forums(
            Forum.objects.all(), self.request.user,
        )

        # Returns the posts submitted by the considered user.
        return (
            Post.objects
            .select_related('topic', 'topic__forum', 'poster')
            .prefetch_related('poster__forum_profile')
            .filter(poster=self.poster, topic__forum__in=forums)
            .order_by('-created')
        )
def get_queryset ( self ) : forums = self . request . forum_permission_handler . get_readable_forums ( Forum . objects . all ( ) , self . request . user , ) return ( Post . objects . select_related ( 'topic' , 'topic__forum' , 'poster' ) . prefetch_related ( 'poster__forum_profile' ) . filter ( poster = self . poster , topic__forum__in = forums ) . order_by ( '-created' ) )
Returns the list of items for this view.