Skip to content
Advertisement

Tag: rest

Django REST Framework serializer field required=false

from the documentation: read_only Set this to True to ensure that the field is used when serializing a representation, but is not used when updating an instance during deserialization. Defaults to False required Normally an error will be raised if a field is not supplied during deserialization. Set to false if this field is not required to be present during

Flask POST request is causing server to crash

I am trying to make a simple api in Flask, the first step being getting the POST json data. (I just want to print it for now) This is my code and when I request /api with json data, it returns a 500 error. Any thoughts on why this is happening? The curl command: body.json: Answer First what you want

Advertisement