title: Django customise response for success and fail
body: <p>I want to create customise response for both success and fail for 1 of my serializer. Right now i only have the create function for success only</p>
  
  <p>I want the output to display like the default output + my 2 other message.</p>
  
  <p>promptmsg and status.</p>
  
  <p>eg output of json data: if success: </p>
  
  <p>promptmsg = "You have successfully create xxx"<br>
  status = '200'  </p>
  
  <p>if fail</p>
  
  <p>promptmsg = "You have fail to create xxx"<br>
  status = '400'  </p>
  
  <p>Here is the code for my views</p>
  
  <pre><code>class ScheduleViewSet(viewsets.ModelViewSet):
      permission_classes = [AllowAny]
      queryset = Schedule.objects.all()
      serializer_class = ScheduleSerializer
  
      def create(self, request, *args, **kwargs):
          serializer = self.get_serializer(data=request.data)
          if not serializer.is_valid(raise_exception=False):
              return Response({"promptmsg": "You have failed to register an account",
                               "status": "400"}, status=HTTP_400_BAD_REQUEST)
  
          response = super(ScheduleViewSet, self).create(request, *args, **kwargs)
          response.data['promptmsg'] = 'You have successfully create a book'
          response.data['statuscode'] = '200'
          return response
  
      def update(self, request, *args, **kwargs):
          partial = kwargs.pop('partial', False)
          instance = self.get_object()
          serializer = self.get_serializer(instance, data=request.data, partial=partial)
          if not serializer.is_valid(raise_exception=False):
              return Response({"promptmsg": "You have failed to register an account",
                               "statuscode": "400"}, status=HTTP_400_BAD_REQUEST)
  
          # serializer.is_valid(raise_exception=True)
          # self.perform_update(serializer)
          response = super(ScheduleViewSet, self).update(request, *args, **kwargs)
          response.data['promptmsg'] = 'You have successfully create a book'
          response.data['statuscode'] = '200'
          return response
  </code></pre>
  
  <p>As you can see, if fail, it will just return the promptmsg and status only.</p>
  
  <p>If success will display default response + promptmsg + status.</p>
  
  <p>So how do i change it ?</p>