django scratch rapid collection of 12 objects queryset

 

Use of the queried sequence quweyset object to a format conversion          have not read the document to be written comprehension

 

from django.core.serializers import serializers

Introduced into the packets for a file format conversion

E.g 

from django.core import serializers
data = serializers.serialize("json", SomeModel.objects.all())

The collection will be found directly convert json

Guess you like

Origin www.cnblogs.com/zengxm/p/11324703.html