aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorEthan Fremen2013-06-07 19:25:39 -0700
committerEthan Fremen2013-06-07 19:25:39 -0700
commitae2887ffc41b1e05d6706f51b00266efccad7a58 (patch)
tree9f4fcd65879b41f776865963765c98ced5a88384 /rest_framework
parent75e3cbc903f265e88ac28c6d35ec4ba8e76fed3b (diff)
downloaddjango-rest-framework-ae2887ffc41b1e05d6706f51b00266efccad7a58.tar.bz2
Set the args and kwargs before initializing the request.
Allows get_parser_context to function correctly. Signed-off-by: Ethan Fremen <ethan@matterport.com>
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/views.py b/rest_framework/views.py
index 0c1ea7d7..c28d2835 100644
--- a/rest_framework/views.py
+++ b/rest_framework/views.py
@@ -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: