title: Show objects on APIView
body: <p>I have a model, and I just want to show the data of the model in my /api/</p>
  
  <pre><code>from django.db import models
  from rest_framework.authtoken.models import Token
  from django.contrib.auth.models import User
  
  class Book(models.Model):
      order_id = models.IntegerField()
      isbn = models.IntegerField()
      publisher = models.CharField(max_length=256)
      school = models.CharField(max_length=256)
      price = models.IntegerField()
      duration = models.CharField(max_length=10)
      order_datetime = models.DateTimeField(auto_now=False, auto_now_add=False)
  
      def __str__(self):
          return str(self.order_id)
  </code></pre>
  
  <p>This is my urls.py:</p>
  
  <pre><code>from django.contrib import admin
  from django.urls import path
  from filter import views
  
  urlpatterns = [
      path('', views.index, name='index'),
      path('api/', views.BookApiView.as_view(), name='book_api'),
      path('admin/', admin.site.urls),
  ]
  </code></pre>
  
  <p>This is my views.py:</p>
  
  <pre><code>from django.shortcuts import render
  from rest_framework.views import APIView
  from .models import Book
  from django.http import JsonResponse
  
  
  class BookApiView(APIView):
      def get(self, request, format=None):
          books = Book.objects.all()
          return JsonResponse({'model': list(books)})
  </code></pre>
  
  <p>I get the following error: 'Object of type 'Book' is not JSON serializable'</p>
  
  <p>Regards,</p>
  
  <p>Anthony</p>