From fa9f5fb8dcf6d51b2db70d4e2a991779b056d1d4 Mon Sep 17 00:00:00 2001 From: Philip Douglas Date: Fri, 21 Jun 2013 16:28:17 +0100 Subject: Allow uppercase methods in action decorator. Previously, using uppercase for the method argument would silently fail to route those methods. --- rest_framework/routers.py | 1 + 1 file changed, 1 insertion(+) (limited to 'rest_framework/routers.py') 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 = [] -- cgit v1.2.3