Answer the question
In order to leave comments, you need to log in
super(). in Django, what is it?
Good evening, now I'm studying Django from a book, I came across a code, in general, everything is clear, except for one thing, what is super()., I searched on the Internet, but did not understand the essence. The question is, help me understand what super() is. what it is for, where it is used in a simple language. Be grateful for help.
Code from the Book:
class BbCreateView(CreateView):
template_name = 'bboard/create.html'
form_class = BbForm
success_url = reverse_lazy('index')
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["rubris"] = Rubric.objects.all()
return context
Answer the question
In order to leave comments, you need to log in
You should first learn the Python programming language before taking on the study of frameworks written in it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question