This commit is contained in:
suren shrestha 2017-04-27 10:43:35 +00:00 committed by GitHub
commit 38248a2f72

View File

@ -474,10 +474,10 @@ class APIView(View):
self.headers = self.default_response_headers # deprecate?
try:
self.initial(request, *args, **kwargs)
# Get the appropriate handler method
if request.method.lower() in self.http_method_names:
self.initial(request, *args, **kwargs)
handler = getattr(self, request.method.lower(),
self.http_method_not_allowed)
else: