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
a0267123
Commit
a0267123
authored
Mar 17, 2022
by
Felizia Tiburcio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display auction item info on page
parent
d351f132
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
auction.html
boodlesite/templates/auction.html
+2
-6
views.py
main/views.py
+8
-3
No files found.
boodlesite/templates/auction.html
View file @
a0267123
...
@@ -44,14 +44,10 @@
...
@@ -44,14 +44,10 @@
<div
class=
"product-info"
style=
"border: 2px dotted black;"
>
<div
class=
"product-info"
style=
"border: 2px dotted black;"
>
<h2>
Product Name
</h2>
<h2>
{{ item_name }}
</h2>
<h4>
Product Specifications
</h4>
<h4>
Product Specifications
</h4>
<p>
description description description
<p>
{{ item_specs }}
</p>
description description description
description description description
description description description
description description description
</p>
</div>
</div>
<button
class=
"btn-place-bid"
>
Place Bid
</button>
<button
class=
"btn-place-bid"
>
Place Bid
</button>
...
...
main/views.py
View file @
a0267123
...
@@ -31,15 +31,20 @@ def auction(request, pk):
...
@@ -31,15 +31,20 @@ def auction(request, pk):
# Current auction ID
# Current auction ID
auction
=
Auction
.
objects
.
get
(
pk
=
pk
)
auction
=
Auction
.
objects
.
get
(
pk
=
pk
)
# print('auction', pk, auction)
auction_item
=
auction
.
itemid
# print(auction.title,auction.info)
context
=
{
'item_name'
:
auction_item
.
itemname
,
'item_specs'
:
auction_item
.
itemspecs
}
if
auction
.
auctionend
<
datetime
.
now
():
if
auction
.
auctionend
<
datetime
.
now
():
return
HttpResponse
(
"This auction has already passed."
)
return
HttpResponse
(
"This auction has already passed."
)
elif
auction
.
auctionstart
>
datetime
.
now
():
elif
auction
.
auctionstart
>
datetime
.
now
():
return
HttpResponse
(
"This auction has not yet started."
)
return
HttpResponse
(
"This auction has not yet started."
)
else
:
else
:
return
render
(
request
,
"boodlesite/templates/auction.html"
)
return
render
(
request
,
"boodlesite/templates/auction.html"
,
context
)
...
...
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