def post(self, request, format=None):
     request.data['creater'] = request.user.username
     serializer = BoardSerializer(data=request.data)
     if serializer.is_valid():
         serializer.save(creater=request.user)
         return Response(serializer.data, status=201)
     return Response(serializer.errors, status=400)
 def put(self, request, pk, format=None):
     board = self.get_object(pk)
     serializer = BoardSerializer(board, data=request.data, partial=True)
     if serializer.is_valid():
         serializer.save()
         return Response(serializer.data)
     return JsonResponse(serializer.errors,
                         status=status.HTTP_400_BAD_REQUEST)