def getEditgameUpdateForm (game): """ Gets an update for the edit game page. Keyword Arguments: game -- row representing the current game Return Values: formUpdate -- web2py form """ from gluon import current, redirect, URL, SQLFORM db = current.db #Hide some fields of the form hideFields (db.game, ['id', 'host_id', 'game_status', 'password']) formUpdate = SQLFORM(db.game, game.id) formUpdate.add_class('assassins-form') if formUpdate.process().accepted: resizeImage(db.game, game.id) redirect(getUrl('edit', game.id)) return formUpdate
def getEditgameUpdateForm(game): """ Gets an update for the edit game page. Keyword Arguments: game -- row representing the current game Return Values: formUpdate -- web2py form """ from gluon import current, redirect, URL, SQLFORM db = current.db #Hide some fields of the form hideFields(db.game, ['id', 'host_id', 'game_status', 'password']) formUpdate = SQLFORM(db.game, game.id) formUpdate.add_class('assassins-form') if formUpdate.process().accepted: resizeImage(db.game, game.id) redirect(getUrl('edit', game.id)) return formUpdate