def provider_add(): form = SshForm() if form.validate_on_submit(): ssh.add_provider(form) flash(_('Ssh informations added')) return redirect(url_for("ssh.provider_list")) return render_template('ssh_provider_add.html', form=form)
def provider_edit(id): provider = ssh.get_provider(id) form = SshForm(obj=provider) if form.validate_on_submit(): ssh.edit_provider(form, provider) flash(_('Ssh provider edit')) return redirect(url_for("ssh.provider_list")) return render_template('ssh_provider_edit.html', form=form)