mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 13:00:12 +03:00
Merge 36639f4765
into 66e015c5ec
This commit is contained in:
commit
38248a2f72
|
@ -474,10 +474,10 @@ class APIView(View):
|
||||||
self.headers = self.default_response_headers # deprecate?
|
self.headers = self.default_response_headers # deprecate?
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.initial(request, *args, **kwargs)
|
|
||||||
|
|
||||||
# Get the appropriate handler method
|
# Get the appropriate handler method
|
||||||
if request.method.lower() in self.http_method_names:
|
if request.method.lower() in self.http_method_names:
|
||||||
|
self.initial(request, *args, **kwargs)
|
||||||
|
|
||||||
handler = getattr(self, request.method.lower(),
|
handler = getattr(self, request.method.lower(),
|
||||||
self.http_method_not_allowed)
|
self.http_method_not_allowed)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user