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
f0a2d71d
Commit
f0a2d71d
authored
Apr 18, 2022
by
Christine Dela Rosa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edit views.py, Added marker for log-in
parent
7a9fe988
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
views.py
main/views.py
+6
-5
No files found.
main/views.py
View file @
f0a2d71d
...
...
@@ -41,8 +41,8 @@ def auction(request,pk):
auction_bids
=
AuctionBid
.
objects
.
filter
(
auctionid
=
pk
)
.
order_by
(
'-bidtime'
)
highest_bid
=
auction_item
.
floorprice
#
who you are logged in as
users
=
BoodleUser
.
objects
.
get
(
userid
=
3
)
#
# ⭐ the user that is logged in
users
=
BoodleUser
.
objects
.
get
(
userid
=
1
)
userid
=
users
.
userid
if
auction_bids
:
...
...
@@ -210,8 +210,8 @@ def startAuction(request, pk):
def
tempProfile
(
request
):
# temp view
#### Access to store 1 [ edit accordingly when it becomes accessible thru a user ] ####
user_one
=
BoodleUser
.
objects
.
get
(
userid
=
1
)
user_two
=
BoodleUser
.
objects
.
get
(
userid
=
3
)
user_one
=
BoodleUser
.
objects
.
get
(
userid
=
1
)
# shrek
user_two
=
BoodleUser
.
objects
.
get
(
userid
=
3
)
## tony
context
=
{
'user_one'
:
user_one
,
#### used for navbar, access to user1
...
...
@@ -224,7 +224,8 @@ def profile(request, pk):
current_user
=
BoodleUser
.
objects
.
get
(
pk
=
pk
)
#auction bid user id = 3 --> bids user made --> know auctions g
bidsByUser
=
AuctionBid
.
objects
.
filter
(
boodleuserid
=
3
)
.
distinct
(
'auctionid'
)
## ⭐ the user that is logged in
bidsByUser
=
AuctionBid
.
objects
.
filter
(
boodleuserid
=
1
)
.
distinct
(
'auctionid'
)
auctionsOfUser
=
Auction
.
objects
.
all
()
.
distinct
(
'auctionid'
)
# for auction in auctionsOfUser:
...
...
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