Added color and qty to minifigs
This commit is contained in:
parent
c54111e7a1
commit
18f7b20b39
4
app.py
4
app.py
@ -24,6 +24,8 @@ def sets(tmp):
|
|||||||
|
|
||||||
with open('./static/sets/'+tmp+'/info.json') as info:
|
with open('./static/sets/'+tmp+'/info.json') as info:
|
||||||
info_file = json.loads(info.read())
|
info_file = json.loads(info.read())
|
||||||
|
with open('./static/sets/'+tmp+'/minifigs.json') as info:
|
||||||
|
minifigs_file = json.loads(info.read())
|
||||||
with open('./static/sets/'+tmp+'/inventory.json') as inventory:
|
with open('./static/sets/'+tmp+'/inventory.json') as inventory:
|
||||||
inventory_file = json.loads(inventory.read())
|
inventory_file = json.loads(inventory.read())
|
||||||
with open('./info/'+tmp+'.json') as info:
|
with open('./info/'+tmp+'.json') as info:
|
||||||
@ -78,7 +80,7 @@ def sets(tmp):
|
|||||||
return ('', 204)
|
return ('', 204)
|
||||||
else:
|
else:
|
||||||
return render_template('bootstrap_table.html', tmp=tmp,title=info_file['name'],
|
return render_template('bootstrap_table.html', tmp=tmp,title=info_file['name'],
|
||||||
info_file=info_file,inventory_file=inventory_file,json_file=json_file)
|
info_file=info_file,inventory_file=inventory_file,json_file=json_file,minifigs_file=minifigs_file)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
lego.py
2
lego.py
@ -159,6 +159,8 @@ for x in response["results"]:
|
|||||||
for i in response["results"]:
|
for i in response["results"]:
|
||||||
part = {
|
part = {
|
||||||
"name": i["part"]["name"],
|
"name": i["part"]["name"],
|
||||||
|
"quantity": i["quantity"],
|
||||||
|
"color_name": i["color"]["name"],
|
||||||
"part_num": i["part"]["part_num"],
|
"part_num": i["part"]["part_num"],
|
||||||
"part_img_url": i["part"]["part_img_url"]
|
"part_img_url": i["part"]["part_img_url"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user