[Solved]-Django Class Based Generic Views URL Variable Passing

23👍

You can access positional arguments in self.args and name-based arguments in self.kwargs.

class Group(ListView): 

    def get_queryset(self):
        model_group_id=self.kwargs['model_group_id']
        ...

See the docs for more info.

Leave a comment