Ejemplo n.º 1
0
def remove_link(user, collection_id, link_index):
    collection = collections.read(user, collection_id)

    del (collection.links[link_index])

    collection.put()
    return collection
Ejemplo n.º 2
0
def remove_link(user, collection_id, link_index):
	collection = collections.read(user, collection_id)

	del(collection.links[link_index])

	collection.put()
	return collection
Ejemplo n.º 3
0
def update(user, collection_id, link_index, form_data):

    collection = collections.read(user, collection_id)
    link = collection.links[link_index]

    if 'name' in form_data and form_data['name']:
        logging.info(form_data)
        link.name = form_data['name']

    if 'description' in form_data and form_data['description']:
        link.description = form_data['description']

    collection.put()

    return collection
Ejemplo n.º 4
0
def update(user, collection_id, link_index, form_data):

	collection = collections.read(user, collection_id)
	link = collection.links[link_index]

	if 'name' in form_data and form_data['name']:
		logging.info(form_data)
		link.name = form_data['name']

	if 'description' in form_data and form_data['description']:
		link.description = form_data['description']

	collection.put()

	return collection