python - Why it my serializer does not recognize all fields when I send a json? -


hello i'm working endpoint using django + django rest framework, endpoint must receive array objects file in every object , once received file sent amazon s3.

note: using python-cassandra driver.

my object is:

class archivo(usertype):     tipo_documento = columns.text()     llave_s3 = columns.text()     bucket = columns.text()     tipo_contenido = columns.text()     subido = columns.datetime()  class laboratorio(model):     certificado = columns.set(columns.userdefinedtype(cassandra_types.prueba))     foto = columns.userdefinedtype(cassandra_types.archivo)     equipamiento = columns.userdefinedtype(cassandra_types.equipo) 

and serializers:

class pruebaserializer(serializers.serializer):     nombre = serializers.charfield()     organismo = serializers.charfield()     costo = serializers.floatfield()     numero = serializers.charfield()     norma = serializers.charfield()     archivo = serializers.filefield(write_only=true,                                     required=false,                                     validators=[sav_validators.filevalidator()]                                     )  class laboratorioserializercreate(serializers.serializer):     certificado = cassandra_serializers.pruebaserializer(many=true)     foto = serializers.filefield(required=false,                                  validators=[sav_validators.filevalidator(                                      constants.allowed_image_types)]                                  )     equipamiento = cassandra_serializers.equiposerializer(required=false) 

the problem when send request using angular client throw 400 bad request. error

reviewing request received next fields in request: fields fields2

but don't know why throw exception when send request.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -