title: Serializing and deserializing in Django Rest Framework
body: <p>Being newbie to Django REST Framework, I have problems deserializing an object given its primary key in my ModelSerializer.
  For example, I have 2 serializers that extend ModelSerializer:</p>
  
  <pre><code>class CourierSerializer(serializers.ModelSerializer):
      class Meta:
          model = Courier
          fields = (
              "first_name",
              "last_name",
              "phone"
          )
  
  class OrderSerializer(serializers.ModelSerializer):
      courier = CourierSerializer()
  
      class Meta:
          model = Order
          fields = (
              "number",
              "courier"
          )
  </code></pre>
  
  <p>And my class based view looks like this:</p>
  
  <pre><code>class OrderList(generics.ListCreateAPIView):
      model = Order
      serializer_class = OrderSerializer
  </code></pre>
  
  <p>Now, when I serialize my Order model to JSON I get exactly what I want - object "Order" with detailed nested information about it's "Courier":</p>
  
  <pre><code>[
      {
          id: 1,
          number: "000231",
          courier: {
              id: 2,
              first_name: "John",
              last_name: "Smith",
              phone: "12345678"
          }
      },
      ...
  ]
  </code></pre>
  
  <p>but on POST call from client-side I want to receive just a foreign key to Courier:</p>
  
  <pre><code>{
      id: 1,
      number: "000231",
      courier: 2
  }
  </code></pre>
  
  <p>What should I add to my OrderSerializer class to deserialize that kind of JSON into Order model? Should I write restore_object()? Or should I write additional serializer to deserialize? How is it gonna work with my (generics.ListCreateAPIView) view, can I use two separate serializers (one for list, one for post) for this purpose?</p>