class_object = ModelClass(title=entity_object['title'],
entities_definition_key=entity_object['entities_definition_key'],
orderId=entity_object['orderId'],uid = json.dumps( uuid.uuid4(),
cls=UUIDEncoder))
ModelClass - это класс моделей mongoengine
json_output = class_object.serializing_method()
final_list.append(json_output)
another_class_object = AnotherModelClass(workflowId=body['workflowId'],entities_list=final_list)
another_class_object.save()
сохранить () в mongodb
final_dict={}
final_dict['entities_list'] = another_class_object.entities_list
return HttpResponse(json.dumps({'entity_definition_dict':entity_definition_dict}))
выход - {'uid': "\" 74b1900ccfbd44234563805ac0279d \ ""}