logo
  • 教程列表
  • SO官方文檔
  • 使用帶有 AngularJS 的 django-rest-framework 作為前端框架
    • Angular 請求
    • DRF 檢視
  1. StackOverflow 文件
  2. django-rest-framework 教程
  3. 使用帶有 AngularJS 的 django-rest-framework 作為前端框架
  4. DRF 檢視

DRF 檢視

Created: November-22, 2018

class UserRegistration(APIView):
    def post(self, request, *args, **kwargs):
        serializer = UserRegistrationSerializer(data=request.data)
        serializer.is_valid(raise_exception=True)
        serializer.save()
        return Response(serializer.to_representation(instance=serializer.instance), status=status.HTTP_201_CREATED)
  • Angular 請求

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明