Python--day72--Django內置的serializers序列化介紹

序列化

Django內置的serializers

def books_json(request): book_list = models.Book.objects.all()[0:10] from django.core import serializers ret = serializers.serialize("json", book_list) return HttpResponse(ret)
相關文章
相關標籤/搜索