MCPcopy
hub / github.com/django/django / setup

Method setup

django/views/generic/base.py:126–132  ·  view source on GitHub ↗

Initialize attributes shared by all view methods.

(self, request, *args, **kwargs)

Source from the content-addressed store, hash-verified

124 return view
125
126 def setup(self, request, *args, **kwargs):
127 """Initialize attributes shared by all view methods."""
128 if hasattr(self, "get") and not hasattr(self, "head"):
129 self.head = self.get
130 self.request = request
131 self.args = args
132 self.kwargs = kwargs
133
134 def dispatch(self, request, *args, **kwargs):
135 # Try to dispatch to the right method; if a method doesn't exist,

Callers 9

viewMethod · 0.95
get_asgi_applicationFunction · 0.45
get_wsgi_applicationFunction · 0.45
handleMethod · 0.45
executeMethod · 0.45
_init_workerFunction · 0.45
update_catalogsFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by 1