from django.core import serializers
data = serializers.serialize("json", SomeModel.objects.all())
data1 = serializers.serialize("json", SomeModel.objects.filter(myfield1=myvalue))
https://www.cnblogs.com/wjw1014/p/8848065.html
2021-11-03 02:37:45
from django.core import serializers
data = serializers.serialize("json", SomeModel.objects.all())
data1 = serializers.serialize("json", SomeModel.objects.filter(myfield1=myvalue))
https://www.cnblogs.com/wjw1014/p/8848065.html