Set the args and kwargs before initializing the request.

Allows get_parser_context to function correctly.

Signed-off-by: Ethan Fremen <ethan@matterport.com>
This commit is contained in:
Ethan Fremen 2013-06-07 19:25:39 -07:00
parent 75e3cbc903
commit ae2887ffc4

View File

@ -304,10 +304,10 @@ class APIView(View):
`.dispatch()` is pretty much the same as Django's regular dispatch,
but with extra hooks for startup, finalize, and exception handling.
"""
request = self.initialize_request(request, *args, **kwargs)
self.request = request
self.args = args
self.kwargs = kwargs
request = self.initialize_request(request, *args, **kwargs)
self.request = request
self.headers = self.default_response_headers # deprecate?
try: