title: populate form field with current values
body: <p>I have a form for creating and updating the rental space. For creating, it is working ok but for updating the form is shown empty. Rather it should show the current value in the fields. How can i now populate the field with current values when updating?</p>
  
  <p>Here is what i have done</p>
  
  <pre><code>url(r'^rents(?:/(?P&lt;token&gt;[0-9a-z]+))?', Rent.as_view(), name="rent"),
  
  class RentSerializer(serializers.ModelSerializer):
      owner = serializers.SerializerMethodField()
      class Meta:
          model = Rental
          read_only = ('id', 'token', 'created_on', 'modified_on', 'slug', )
          fields = ('__all__')
  
      def get_owner(self, obj):
          return str(obj.owner)
  
      def create(self, validated_data): #same as update just change to .create()
  
      def update(self, instance, validated_data):
          instance = super(RentSerializer, self).update(instance, validated_data)
          return instance
  </code></pre>
  
  <p>views.py </p>
  
  <pre><code>class Rent(APIView):
      """
      List all the rents if token is not provided else a token specific rent
      """
      serializer_class = RentSerializer
      def get(self, request, token=None, format=None):
          reply={}
          try:
              rents = Rental.objects.filter(owner=request.user)
              if token:
                  rent = rents.get(token=token)
                  reply['data'] = self.serializer_class(rent).data
              else:
                  reply['data'] = self.serializer_class(rents, many=True).data
          except Rental.DoesNotExist:
              return error.RequestedResourceNotFound().as_response()
          except:
              return error.UnknownError().as_response()
          else:
              return Response(reply, status.HTTP_200_OK)
  
      def post(self, request, token=None, format=None):
          rent = None
          # if token is None, its a list new rent
          if not token is None:
              try:
                  rent = Rental.objects.filter(owner=request.user).get(token=token)
              except Rental.DoesNotExist:
                  return error.RequestedResourceNotFound().as_response()
              except:
                  return error.UnknownError().as_response()
          serialized_data = self.serializer_class(instance=rent, data=request.data, partial=True)
          if serialized_data.is_valid():
              serialized_data.save(owner=request.user)
          else:
              return error.ValidationError(serialized_data.errors).as_response()
          reply={}
          reply['data'] = self.serializer_class(instance=rent, many=False).data
          return Response(reply, status.HTTP_200_OK)
  </code></pre>
  
  <p>I dont want to use viewset. How can i do this using APIView? </p>