KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a model that has many fields, however for this problem I only need 3 of those fields. When I try to serialize a .values set I get an exception: 'dict' object has no attribute '_meta' This is my code: queryset = myModel.objects.filter(foo_icontains=bar).values('f1', 'f2', 'f3') serialized_q = serializers.serialize('json', queryset, ensure_ascii=False)
Tags (comma-separated)
Save Edits
Cancel