def create_new_palette(config): model = XMLObject('palette') model.attrs['name'] = config.default_name model.attrs['guid'] = generate_guid() colors = XMLObject('colors') model.childs.append(colors) page = XMLObject('page') colors.childs.append(page) return model
def create_new_palette(config): model = XMLObject('palette') model.attrs['name'] = '' + config.default_name model.attrs['guid'] = generate_guid() colors = XMLObject('colors') model.childs.append(colors) page = XMLObject('page') colors.childs.append(page) return model