This commit is contained in:
Philip Douglas 2013-06-21 14:21:40 -07:00
commit a995da3d86
2 changed files with 8 additions and 7 deletions

View File

@ -108,7 +108,7 @@ For example:
queryset = User.objects.all()
serializer_class = UserSerializer
@action
@action()
def set_password(self, request, pk=None):
user = self.get_object()
serializer = PasswordSerializer(data=request.DATA)

View File

@ -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 = []