Commit a0267123 authored by Felizia Tiburcio's avatar Felizia Tiburcio

Display auction item info on page

parent d351f132
......@@ -44,14 +44,10 @@
<div class="product-info" style="border: 2px dotted black;">
<h2>Product Name</h2>
<h2>{{ item_name }} </h2>
<h4>Product Specifications</h4>
<p>description description description
description description description
description description description
description description description
description description description</p>
<p>{{ item_specs }}</p>
</div>
<button class="btn-place-bid">Place Bid</button>
......
......@@ -31,15 +31,20 @@ def auction(request, pk):
# Current auction ID
auction = Auction.objects.get(pk=pk)
# print('auction', pk, auction)
# print(auction.title,auction.info)
auction_item = auction.itemid
context = {
'item_name':auction_item.itemname,
'item_specs': auction_item.itemspecs
}
if auction.auctionend < datetime.now():
return HttpResponse("This auction has already passed.")
elif auction.auctionstart > datetime.now():
return HttpResponse("This auction has not yet started.")
else:
return render(request, "boodlesite/templates/auction.html")
return render(request, "boodlesite/templates/auction.html",context)
......
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