I get this error
TypeError at /debate/1/
get_context_data() takes exactly 2 arguments (1 given)
Right now it is defined as:
def get_context_data(self, **kwargs):
And I want it to be:
def get_context_data(self, request, **kwargs):
so I can do inside:
sort_by = request.GET.get('sort', '-rating_score')
Is this a good idea, and how to do it?