Example #1
0
def ms_create_rack():
    if request.method == 'POST':
        rackid = request.form['rackid']
        crm = ""
        mfg_so = ""
        lerom = ""
        mtm = ""
        customer = "Microsoft"
        racktype = "ms"
        sn = request.form['sn']
        expected_ship_date = ""
        ctb_date = ""
        estimated_ship_date = ""
        comments = request.form['comments']
        rack = Rack(rackid,
                    crm,
                    mfg_so,
                    lerom,
                    mtm,
                    customer,
                    racktype,
                    sn,
                    expected_ship_date,
                    ctb_date,
                    estimated_ship_date,
                    comments,
                    status="Readiness")
        rack.save_to_db()
        return redirect(
            url_for(".ms_racks_under_test",
                    _id=rack._id))  # Here put only the 1st stage and BSL
    return render_template('racks/ms_form.jinja2')
Example #2
0
def create_rack():
    if request.method == 'POST':
        rackid = request.form['rackid']
        crm = request.form['crm']
        mfg_so = request.form['mfg_so']
        lerom = request.form['lerom']
        mtm = request.form['mtm']
        customer = request.form['customer']
        racktype = request.form['racktype']
        sn = request.form['sn']
        expected_ship_date = request.form['expected_ship_date']
        ctb_date = request.form['ctb_date']
        estimated_ship_date = request.form['estimated_ship_date']
        comments = request.form['comments']
        rack = Rack(rackid, crm, mfg_so, lerom, mtm, customer, racktype, sn,
                    expected_ship_date, ctb_date, estimated_ship_date,
                    comments)
        rack.save_to_db()
        return redirect(url_for(".adding_tasks", _id=rack._id))
    return render_template('racks/form.jinja2')