@action(detail=True, methods=['put'], name='Change Password') def password(self, request, pk=None): code example
Example: drf viewsets
class AccountViewSet(viewsets.ReadOnlyModelViewSet):
"""
A simple ViewSet for viewing accounts.
"""
queryset = Account.objects.all()
serializer_class = AccountSerializer