Commit 6bf5d0e6 authored by Felizia Tiburcio's avatar Felizia Tiburcio

Display name of host in auction

parent e470feb1
...@@ -57,11 +57,13 @@ ...@@ -57,11 +57,13 @@
<div class="col-lg-5 col-md-6 auction-right"> <div class="col-lg-5 col-md-6 auction-right">
<div class="product-info" > <div class="product-info" >
<h2>{{ item_name }} </h2> <h2>{{ item_name }} </h2>
<p>Sold by {{ auction_host.storename }}</p>
<p>{{ item_specs }}</p> <p>{{ item_specs }}</p>
<h4>Starting at: ₱ {{item_floor_price}}</h4> <h4>Starting at: ₱ {{item_floor_price}}</h4>
</div> </div>
......
...@@ -91,6 +91,9 @@ def auction(request,pk): ...@@ -91,6 +91,9 @@ def auction(request,pk):
auction = Auction.objects.get(pk=pk) auction = Auction.objects.get(pk=pk)
# Item for auction # Item for auction
auction_item = auction.itemid # this is the itemfk thru auction auction_item = auction.itemid # this is the itemfk thru auction
# Host
auction_host = auction_item.storeid
# Auction bids # Auction bids
auction_bids = AuctionBid.objects.filter(auctionid=pk).order_by('-bidtime') auction_bids = AuctionBid.objects.filter(auctionid=pk).order_by('-bidtime')
highest_bid = auction_item.floorprice highest_bid = auction_item.floorprice
...@@ -122,6 +125,7 @@ def auction(request,pk): ...@@ -122,6 +125,7 @@ def auction(request,pk):
context = { context = {
'item_name':auction_item.itemname, 'item_name':auction_item.itemname,
'item_specs': auction_item.itemspecs, 'item_specs': auction_item.itemspecs,
'auction_host':auction_host,
'auction_bids' : auction_bids, 'auction_bids' : auction_bids,
'item_floor_price': auction_item.floorprice, 'item_floor_price': auction_item.floorprice,
'highest_bid': highest_bid, 'highest_bid': highest_bid,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment