def add(): Bookmark.from_dict(request.vars["bookmark_obj"]).add() # bookmark, bookmarks = get_bookmark() # # # update session and db # if bookmark['key'] not in bookmarks: # bookmarks[bookmark['key']] = bookmark['data'] # db(db.auth_user.id == auth.user.id).update(bookmarks=bookmarks) # redirect(URL('default', 'index')) return
def add(): Bookmark.from_dict(request.vars['bookmark_obj']).add() # bookmark, bookmarks = get_bookmark() # # # update session and db # if bookmark['key'] not in bookmarks: # bookmarks[bookmark['key']] = bookmark['data'] # db(db.auth_user.id == auth.user.id).update(bookmarks=bookmarks) # redirect(URL('default', 'index')) return
def delete(): Bookmark.from_dict(request.vars["bookmark_obj"]).delete() # bookmark, bookmarks = get_bookmark() # # # update session and db # try: # del bookmarks[bookmark['key']] # db(db.auth_user.id == auth.user.id).update(bookmarks=bookmarks) # except: # pass # redirect(URL('default', 'index')) return
def delete(): Bookmark.from_dict(request.vars['bookmark_obj']).delete() # bookmark, bookmarks = get_bookmark() # # # update session and db # try: # del bookmarks[bookmark['key']] # db(db.auth_user.id == auth.user.id).update(bookmarks=bookmarks) # except: # pass # redirect(URL('default', 'index')) return