Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Boodle
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martina Therese R. Reyes
Boodle
Commits
6bf5d0e6
Commit
6bf5d0e6
authored
May 18, 2022
by
Felizia Tiburcio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display name of host in auction
parent
e470feb1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
auction.html
boodlesite/templates/auction.html
+3
-1
views.py
main/views.py
+4
-0
No files found.
boodlesite/templates/auction.html
View file @
6bf5d0e6
...
@@ -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>
...
...
main/views.py
View file @
6bf5d0e6
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment