diff options
| author | Philip Douglas | 2013-06-21 16:28:17 +0100 |
|---|---|---|
| committer | Philip Douglas | 2013-06-21 16:28:17 +0100 |
| commit | fa9f5fb8dcf6d51b2db70d4e2a991779b056d1d4 (patch) | |
| tree | ee80d52fd0234c0c04fba0e57457641da9a63a28 | |
| parent | f3529f1f4a3b01c2821278da3bafbc04c1c00553 (diff) | |
| download | django-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.
| -rw-r--r-- | rest_framework/routers.py | 1 |
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 = [] |
