python 通过API在OrderPoint上注册客户
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 通过API在OrderPoint上注册客户相关的知识,希望对你有一定的参考价值。
class OrderPointViewSet(viewsets.ModelViewSet):
""" Order Point resource """
serializer_class = OrderPointSerializer
permission_classes = (permissions.IsAuthenticated, CompanyUserPermission, OrderPointPermission)
....
@list_route(methods=['post'], url_path='register')
def register_customer_on_point(self):
if RegisterCustomerOnOrderPointSerializer(self.request.data).is_valid():
if not self.request.session.get('cart_uuid'):
cart_uuid = uuid4()
else:
cart_uuid = self.request.session['cart_uuid']
return Response({'cart_uuid': cart_uuid}, status=status.HTTP_200_OK)
以上是关于python 通过API在OrderPoint上注册客户的主要内容,如果未能解决你的问题,请参考以下文章
Python按值传递参数和按引用传递参数
如何通过谷歌翻译api在python中使用api键
使用 Python 通过 WebSockets 访问 API
如何通过 Python C api 在 QT 和 Python 之间进行接口
如何通过python调用新浪微博的API
如何通过 Python/C API 将 Python 实例传递给 C++