import json
from myapp.models import MyModel
x = json.dumps(MyModel.objects.values_list('myField', flat=True)) # "[] is not JSON serializable"
x = json.dumps([x for x in MyModel.objects.values_list('myField', flat=True)]) #ok
####
It seems that the database is accessed only if the result of objects.filter()/all()/values_list()/... is printed/iterated/... .
It's fine, but I think the methods of model manager like filter()/all()/values_list() should behave as if it is processing python objects. I have not yet digged into json module, but it did penetrated django's disguise.