утра. Получив эту ошибку, я не могу понять, как ее решить, вот views.py
class SellerTransactionListView(ListView):
model = Transaction
template_name = "sellers/transaction_list_view.html"
def get_queryset(self):
account = SellerAccount.objects.filter(user=self.request.user)
if account.exists():
products = Product.objects.filter(seller=account)
return Transaction.objects.filter(product__in=products)
return []
шаблон транзакции_list_view.html
{% extends "base.html" %}
{% block content %}
<h1>Transactions</h1>
<ul>
{% include "sellers/transaction_list.html" with transaction_list=object_list %}
</ul>
{% endblock %}
и транзакция_list.html
<table>
<thead>
<th>Product</th>
<th>User</th>
<th>order_id</th>
<th>Sale Total</th>
<th></th>
</thead>
<tbody>
{% for trans in transaction_list %}
<tr>
<td>{{ trans.product }}</td>
<td>{{ trans.profile }}</td>
<td>{{ trans.order_id }}</td>
<td>{{ trans.amount }}</td>
<td>{{ trans.timestamp|timesince }} ago</td>
</tr>
{% endfor %}
</tbody>
</table>
если я изменю транзакции_list_view.html включаемую часть на
{% включают "sellers /action_list.html" с
транзакция_лист = транзакция%}
ошибка исчезает, но транзакции не отображаются.