Django class based views - request, args and kwargs objects
问题 It seems to me that in Django's generic class-based views, the parameters request , args and kwargs travel from method to method, both as view instance attributes, as well as method arguments. What do I mean exactly? Class django.views.generic.base.View , defines the following function, called by its as_view method: def view(request, *args, **kwargs): self = cls(**initkwargs) if hasattr(self, 'get') and not hasattr(self, 'head'): self.head = self.get self.request = request self.args = args