|
|
|
@ -55,6 +55,16 @@ def index():
|
|
|
|
|
r.close()
|
|
|
|
|
return render_template('partsearch.html', locations=locations)
|
|
|
|
|
|
|
|
|
|
@app.route('/parts/getlocationsInContainer/<containerID>')
|
|
|
|
|
def get_locations_in_container(containerID):
|
|
|
|
|
s = 'select id, name from locations where container_id = :id order by name;'
|
|
|
|
|
r = db_engine.execute(text(s), id=containerID)
|
|
|
|
|
l={}
|
|
|
|
|
for row in r:
|
|
|
|
|
l[row[0]]= row[1];
|
|
|
|
|
r.close()
|
|
|
|
|
return json.dumps(l)
|
|
|
|
|
|
|
|
|
|
@app.route('/parts/getlocationURL/<locationID>')
|
|
|
|
|
def get_locationURL(locationID):
|
|
|
|
|
s = 'select map from locations where id = :id;'
|
|
|
|
|