add data to db
This commit is contained in:
21
app.py
21
app.py
@@ -140,11 +140,6 @@ def getall():
|
||||
|
||||
return jsonify(results)
|
||||
|
||||
@app.route('/updateduplicate', methods=['GET', 'POST'])
|
||||
def updateduplicate():
|
||||
if request.method == 'POST':
|
||||
aud = request.form.get('auditory_dubl')
|
||||
|
||||
|
||||
@app.route('/vneaud', methods=['GET', 'POST'])
|
||||
def vneaud():
|
||||
@@ -200,19 +195,21 @@ def addraspved():
|
||||
|
||||
query_string = request.data.decode()
|
||||
|
||||
print(query_string)
|
||||
un_query_string = unquote(unquote(query_string)).split(',')
|
||||
|
||||
print(un_query_string)
|
||||
|
||||
|
||||
|
||||
ob = db.session.query(Oboruds).filter_by(invNumber=un_query_string[0]).first()
|
||||
ob.raspologenie=un_query_string[2]
|
||||
ob.numberved = un_query_string[1]
|
||||
|
||||
ob.numberved=un_query_string[1]
|
||||
ob.kolichestvo = un_query_string[2]
|
||||
ob.balancenumber = un_query_string[3]
|
||||
ob.raspologenie=un_query_string[4]
|
||||
|
||||
|
||||
db.session.commit()
|
||||
db.session.close()
|
||||
|
||||
|
||||
|
||||
return jsonify({'success': True}, 200, {'ContentType': 'application/json'})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user