{% extends "base.html" %} {% block content %} {% for i in json_file['unit'] %} {% endfor %} {% for brick in inventory_file.results %} {% for i in json_file['unit'] %} {% endfor %} {% endfor %}
img element_id part_num name color.id color qty is_spareMissing ({{ loop.index }})
{{ brick.element_id }} {{ brick.part.part_num }} {{ brick.part.name }} {{ brick.color.id }} {{ brick.color.name }} {{ brick.quantity }} {{ brick.is_spare }} {% set ns = namespace(count='') %}
{% for j in json_file['unit'][loop.index0]['bricks']['missing'] %} {% if j['brick']['ID'] == brick.part.part_num and j['brick']['color_name'] == brick.color.name %} {% set ns.count = j['brick']['amount'] %} {% endif %} {% endfor %}
{% endblock %}