Exemplo n.º 1
0
def editblstatus(id):
    baseline = Baseline.query.get_or_404(id)
    if request.method == 'POST':
        baseline.status = request.form.get('status')
        db.session.add(baseline)
        db.session.commit()
        return redirect_back()
    return render_template('winglung/editblstatus.html',
                           baseline=baseline,
                           status=Blstatus.query.all())
Exemplo n.º 2
0
def deletebaseline(id):
    baseline = Baseline.query.get_or_404(id)
    db.session.delete(baseline)
    db.session.commit()
    flash('基线已经被删除.')
    return redirect_back()
Exemplo n.º 3
0
def delete_credence(credence_id):
    credence = Credence.query.get_or_404(credence_id)
    db.session.delete(credence)
    db.session.commit()
    flash('删除凭证成功.')
    return redirect_back()
Exemplo n.º 4
0
def delete_machine(machine_id):
    machine = Machine.query.get_or_404(machine_id)
    db.session.delete(machine)
    db.session.commit()
    flash('删除机器成功.')
    return redirect_back()