I'm serializing a bunch of objects with:
json = serializers.serialize("json", objects, fields=('name', 'country'))
I have not included 'pk' in my fields list, but the produced JSON includes a primary key with each serialized object. I do not want my API to expose primary keys to the general public.
Short of munging the output JSON, what is the correct way to tell serializers.serialze()
to not include the primary key?