[Fixed]-Django Aggregation in View

1👍

This is wrong:

<h5 class="list-group-item-heading">Orders Received <span {ordersrecieved}></span></h5>

what you want is:

<h5 class="list-group-item-heading">Orders Received <span> {{ ordersrecieved }}</span></h5>

The way templating works is it converts {things which are in here to the python variable context} so if it is in the text of the html it will work if its an attribute of the span (as in <span {gergerg}>) then that might render but as nothing visible to the user. Also use {{ }} rather than { unless you specified a custom templating parser.

Leave a comment