Added color and qty to minifigs

This commit is contained in:
FrederikBaerentsen 2024-04-12 14:46:02 +02:00
parent c54111e7a1
commit 18f7b20b39
2 changed files with 5 additions and 1 deletions

4
app.py
View File

@ -24,6 +24,8 @@ def sets(tmp):
with open('./static/sets/'+tmp+'/info.json') as info:
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:
inventory_file = json.loads(inventory.read())
with open('./info/'+tmp+'.json') as info:
@ -78,7 +80,7 @@ def sets(tmp):
return ('', 204)
else:
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)

View File

@ -159,6 +159,8 @@ for x in response["results"]:
for i in response["results"]:
part = {
"name": i["part"]["name"],
"quantity": i["quantity"],
"color_name": i["color"]["name"],
"part_num": i["part"]["part_num"],
"part_img_url": i["part"]["part_img_url"]