1👍
✅
try this
import simplejson
from django.core import serializers
data = serializers.serialize("json", myuser.objects.all())
user={}
user['data']=data
simplejson.dumps(user)
Source:stackexchange.com