批量插入数据 后端: def fenye(request): book_list=[] for i in range(100): book_list.append(models.Book(title='第%s本书'%i)) models.Book.objects.bulk_create(book_list) book_qurery=models.Book.objects.all() return render(request,'fenye.html',locals()) 前端: {% for b…
普通分页 普通分页类似于Django中的分页 源码 class PageNumberPagination(BasePagination): """ A simple page number based style that supports page numbers as query parameters. For example: http://api.example.org/accounts/?page=4 http://api.example.org/accounts/…