[Answer]-Many to many reversing through relationship in the template

1👍

Use backward relationship:

{% for order_product in sale.orderproduct_set.all %}
    {{ order_product.product.name }}|{{ order_product.product.price }}|{{ order_product.products_quantity }}|{{ order_product.products_total }}
{% endfor %}

Leave a comment