how to convert a model fields to json format in django code example
Example: how to convert a queryset into json string
# Simply wrap the queryset in a list
data = list(queryset.values())
# Hint: need to use .values() not .all()
# Simply wrap the queryset in a list
data = list(queryset.values())
# Hint: need to use .values() not .all()