[Answered ]-Django Show all posts from a single user

1👍

You can override get_queryset():

class ProfileView(ListView):
    template_name = 'posts/profile.html'
    model = Post

    def get_queryset(self, **kwargs):
        return super().get_queryset(**kwargs).filter(
            author__username=self.kwargs['username']
        )

Note: In Django, class-based views (CBV) often have a …View suffix, to avoid a clash with the model names.
Therefore you might consider renaming the view class to ProfileView, instead of Profile.

Leave a comment