When override the attributes of class view, it comes with:
class IndexView(generic.ListView):
template_name = 'polls/index.html'
context_object_name = 'latest_question_list'
I assume it should be:
class IndexView(generic.ListView):
def __init__(self, *args, **kwargs):
super().__init__(self, *args, **kwargs):
template_name = 'polls/index.html'
context_object_name = 'latest_question_list'
How Django achieve it by assign variable directly?