def save_new_collection_from_yaml(committer_id, yaml_content, collection_id):
 collection = collection_domain.Collection.from_yaml(collection_id, yaml_content)
 commit_message = ("New collection created from YAML file with title '%s'." % collection.title)
 _create_collection(committer_id, collection, commit_message, [{'cmd': CMD_CREATE_NEW, 'title': collection.title, 'category': collection.category}])
 return collection

def save_new_collection_from_yaml ( committer_id , yaml_content , collection_id ) : collection = collection_domain . Collection . from_yaml ( collection_id , yaml_content ) commit_message = ( "New collection created from YAML file with title '%s'." % collection . title ) _create_collection ( committer_id , collection , commit_message , [ { 'cmd' : CMD_CREATE_NEW , 'title' : collection . title , 'category' : collection . category } ] ) return collection
saves a new collection from a yaml content string .