Python+Django - 进行这些更改时看不到我的产品图片、名称和价格:

Python+Django - can't see my product image, name and price when I do those changes :

我有这个代码

<div style="flex:2"><img class="row-image" src="{% static 'images/placeholder.png' %}"></div>
            <div style="flex:2">Product 1</div>
            <div style="flex:1"></div>
            <div style="flex:1">
                <p class="quantity">2</p>

并进行了这些更改:

static 'images/placeholder.png' to {{item.product.imageURL}}
Product 1 to {{item.product.name}}
 to ${{item.product.price|floatformat:2}}
2 to {{item.quantity}}

views

models

您的模型 OrderItem 现场产品中有错字。请修复它或在您的模板中进行此更改 cart.html

{% for item in items %}
<div style="flex:2"><img class="row-image" src="{{item.prouct.imageURL}}"></div>
<div style="flex:2">{{item.prouct.name}}</div>
<div style="flex:1">${{item.prouct.price|floatformat:2}}</div>
<div style="flex:1">
    <p class="quantity">{{item.quantity}}</p>
</div>
{% endfor %}