pipelines.utils module#
- pipelines.utils.get_django_object(serializable_object: Dict[str, Any])#
Converts a serialized object into a django ORM object. The
serializable_objectmust have the following keys:pk: The id of the object in the databaseapp_label: The name of the django app the object belongs tomodel_name: The name of the objects model
- Parameters:
serializable_object – The json object to convert
- pipelines.utils.get_object(serializable_object: Dict[str, Any])#
Converts a serialized object into a concrete python object. This will either return the original
serializable_objector django model object if theserializable_objecthas the following keys:pk: The id of the object in the databaseapp_label: The name of the django app the object belongs tomodel_name: The name of the objects model
- Parameters:
serializable_object – The json object to convert