Converting a django ValuesQuerySet to a json object
Try subsetting the fields in your values list through the serialize
method using a QuerySet instead:
from django.core import serializers
objectQuerySet = ConventionCard.objects.filter(ownerUser = user)
data = serializers.serialize('json', objectQuerySet, fields=('fileName','id'))
Cast the ValuesQuerySet to a list first:
query_set = ConventionCard.objects.values('fileName','id').filter(ownerUser = user)
list(query_set)
Removing the values
call as suggested by ars causes the manager to pull all columns from the table, instead of only the two you need.