Say I have a model as follows:
from django.db import models
class Foo(models.Model):
done = models.BooleanField(default=False, null=True)
And a serializer defined as follows:
from . import models
class FooSerializer(serializers.ModelSerializer):
class Meta:
model = models.Foo
fields = '__all__'
FooSerializer(foo).data will be dict that has a id key, how can one make it have a pk key instead of id so that it matches the rest of my codebase (that use pk, since one-to-one models don't have an id field because they use a FK PK as their own PK.