title: method object is not JSON serializable
body: <p>I am using ajax to refresh the cart items when cart item is removed. It works well, if i don't response object with image otherwise I get an error <code>method object is not JSON serializable</code>. If i use <code>model_to_dict</code> for the image part, i get an error <code>'function' object has no attribute '_meta'</code>. </p>
  
  <p>here is the code</p>
  
  <pre><code>def cart_detail_api_view(request):
      cart_obj, new_obj = Cart.objects.new_or_get(request)
      products = [{
              "id": x.id,
              "url": x.get_absolute_url(),
              "name": x.name,
              "price": x.price,
              "image": x.first_image
              }
              for x in cart_obj.furnitures.all()]
      cart_data  = {"products": products, "subtotal": cart_obj.sub_total, "total": cart_obj.total}
      return JsonResponse(cart_data)
  
  class Furniture(models.Model):
      name = models.CharField(max_length=100, blank=True, null=True)
      manufacturer = models.ForeignKey(Manufacturer, blank=True, null=True)
      slug = models.SlugField(max_length=200, unique=True)
  
      def __str__(self):
          return self.name
  
      def first_image(self):
          """
          Return first image of the furniture otherwise default image
          """
          if self.furniture_pics:
              return self.furniture_pics.first()
          return '/static/img/4niture.jpg'
  
  class Cart(models.Model):
      user = models.ForeignKey(User, null=True, blank=True)
      furnitures = models.ManyToManyField(Furniture, blank=True)
  </code></pre>
  
  <p>I get <code>'function' object has no attribute '_meta'</code> error while wrapping <code>x.first_image</code> to <code>model_to_dict</code></p>
  
  <p>How do i resolve such issue?</p>
  
  <p>UPDATED</p>
  
  <pre><code>class FurniturePic(models.Model):
      """
      Represents furniture picture
      """
      furniture = models.ForeignKey(Furniture, related_name='furniture_pics')
      url = models.ImageField(upload_to=upload_image_path)
  </code></pre>