Here is my model:
class Example(models.Model):
file = S3PrivateFileField()
text = models.TextField(null=True, blank=True)
binary = models.BinaryField(null=True, blank=True)
and here is the serializer:
class ExampleSerializer(ModelSerializer):
class Meta:
model = Example
fields = ['file', 'text', 'binary']
First of all, in the Browsable API, I can see the file
and text
fields but not the binary
fields. How do I see that field?
Secondly, the input data type for the binary
field is string
and I would like to save it as binary
data in the database. How can I get it to work?