aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/routers.py
diff options
context:
space:
mode:
authorPhilip Douglas2013-06-21 16:28:17 +0100
committerPhilip Douglas2013-06-21 16:28:17 +0100
commitfa9f5fb8dcf6d51b2db70d4e2a991779b056d1d4 (patch)
treeee80d52fd0234c0c04fba0e57457641da9a63a28 /rest_framework/routers.py
parentf3529f1f4a3b01c2821278da3bafbc04c1c00553 (diff)
downloaddjango-rest-framework-fa9f5fb8dcf6d51b2db70d4e2a991779b056d1d4.tar.bz2
Allow uppercase methods in action decorator.
Previously, using uppercase for the method argument would silently fail to route those methods.
Diffstat (limited to 'rest_framework/routers.py')
-rw-r--r--rest_framework/routers.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/rest_framework/routers.py b/rest_framework/routers.py
index f70c2cdb..ae64cc3b 100644
--- a/rest_framework/routers.py
+++ b/rest_framework/routers.py
@@ -136,6 +136,7 @@ class SimpleRouter(BaseRouter):
attr = getattr(viewset, methodname)
httpmethods = getattr(attr, 'bind_to_methods', None)
if httpmethods:
+ httpmethods = [method.lower() for method in httpmethods]
dynamic_routes.append((httpmethods, methodname))
ret = []