Initialize attributes shared by all view methods.
(self, request, *args, **kwargs)
| 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, |
no outgoing calls