class MyListView(ListView):

    def dispatch(self, request, *args, **kwargs):
        self.queryset = Resources.objects.filter(user=request.user.username)
How to access HttpRequest from urls.py in Django