def editar_form(jogo_id): jogo_id = int(jogo_id) jogo=Game.get_by_id(jogo_id) jogo_form = GameForm() jogo_form.fill_with_model(jogo) contexto = {'editar_path': router.to_path(atualizar, jogo_id), 'game' : jogo_form} return TemplateResponse(contexto, 'temporario/forme.html')
def editar_form(jogo_id): jogo_id = int(jogo_id) jogo=Game.get_by_id(jogo_id) jogo_form=GameForm() jogo_form.fill_with_model(jogo) contexto={'salvar_path': router.to_path(salvar, jogo_id), 'jogo':jogo_form} return TemplateResponse(contexto, 'editar/home.html')