Skip to content

Commit

Permalink
fix #262
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Nov 22, 2024
1 parent 62c53ad commit 100b115
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions auctions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,10 @@ def total_unsold_lots(self):
def total_lots(self):
return self.lots_qs.exclude(banned=True).count()

@property
def number_of_lots_with_scanned_qr(self):
return self.lots_qs.filter(pageview__source__icontains="qr", auction__pk=self.pk).distinct().count()

@property
def labels_qs(self):
lots = self.lots_qs.exclude(banned=True)
Expand Down
4 changes: 4 additions & 0 deletions auctions/templates/auction_stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ <h4>User engagement</h4>
<tr>
<td>Seller payout</td><td>${{ auction.total_to_sellers|floatformat:2 }}</td>
</tr>
<tr>
<td>Lots with a scanned QR code</td><td>{{ auction.number_of_lots_with_scanned_qr }}</td>
</tr>

</tbody>
</table>

Expand Down

0 comments on commit 100b115

Please sign in to comment.