mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-04-28 04:53:43 +03:00
Allow uppercase methods in action decorator.
Previously, using uppercase for the method argument would silently fail to route those methods.
This commit is contained in:
parent
f3529f1f4a
commit
fa9f5fb8dc
|
@ -136,6 +136,7 @@ class SimpleRouter(BaseRouter):
|
||||||
attr = getattr(viewset, methodname)
|
attr = getattr(viewset, methodname)
|
||||||
httpmethods = getattr(attr, 'bind_to_methods', None)
|
httpmethods = getattr(attr, 'bind_to_methods', None)
|
||||||
if httpmethods:
|
if httpmethods:
|
||||||
|
httpmethods = [method.lower() for method in httpmethods]
|
||||||
dynamic_routes.append((httpmethods, methodname))
|
dynamic_routes.append((httpmethods, methodname))
|
||||||
|
|
||||||
ret = []
|
ret = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user