Y
Y
YraganTron2017-03-21 10:13:47
Django
YraganTron, 2017-03-21 10:13:47

difference between request and self.request in cbv Django?

Why does the get method in, for example, ListView accept request? It seems that it is not used anywhere + we should already have self.request. Well, is there a difference between self.request and request, for example, I want to extend the session lifetime, do I need to refer to self.request or to request?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2017-03-21
@YraganTron

No difference. Also, there is no difference between args/kwargs accepted by a method and self.args/self.kwargs. Just a weird convenience.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question