platform - Python
framework - Django
VS Code/Sqlite3
Question:
I have two html files 1. view_sales.html 2.total_sales.html
view_sales.html
<!DOCTYPE html>
<html>
<head>
<title>Sales</title>
<title>Product Total_price</title>
</head>
<body>
<h1>Sales</h1>
<table border="1">
<tr>
<th>Product</th>
<th>Date</th>
<th>Amount</th>
<th>Quantity Sold</th>
<th>Total Price</th>
</tr>
{% for sale in sales %}
<tr>
<td>{{ sale.product.product_name }}</td>
<td>{{ sale.date }}</td>
<td>{{ sale.amount }}</td>
<td>{{ sale.quantity_sold}}</td>
<td>{{ sale.total_price }}</td>
</tr>
{% endfor %}
</table>
<h2>Total Sales: {{ total_sales }}</h2>
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/56a9ff0a-62f2-4ec0-b8cd-5601174a862en%40googlegroups.com.
No comments:
Post a Comment