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
30b3a976
Commit
30b3a976
authored
Apr 19, 2022
by
Christine Dela Rosa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust start acution redirect to user 1's profile
parent
f0a2d71d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
views.py
main/views.py
+4
-1
No files found.
main/views.py
View file @
30b3a976
...
@@ -177,6 +177,9 @@ def startAuction(request, pk):
...
@@ -177,6 +177,9 @@ def startAuction(request, pk):
store_id
=
current_store
.
storeid
store_id
=
current_store
.
storeid
# get items under this store
# get items under this store
store_items
=
Item
.
objects
.
filter
(
storeid
=
pk
)
store_items
=
Item
.
objects
.
filter
(
storeid
=
pk
)
# Current userid, change as per ⭐ whoever is logged in
user
=
BoodleUser
.
objects
.
get
(
userid
=
1
)
userid
=
user
.
userid
# temp: all auctions
# temp: all auctions
all_auctions
=
Auction
.
objects
.
all
()
all_auctions
=
Auction
.
objects
.
all
()
...
@@ -194,7 +197,7 @@ def startAuction(request, pk):
...
@@ -194,7 +197,7 @@ def startAuction(request, pk):
current_item
=
form
.
cleaned_data
[
'itemid'
]
current_item
=
form
.
cleaned_data
[
'itemid'
]
new_auction
=
Auction
(
title
=
title
,
info
=
info
,
auctionstart
=
starttime
,
auctionend
=
endtime
,
itemid
=
current_item
)
new_auction
=
Auction
(
title
=
title
,
info
=
info
,
auctionstart
=
starttime
,
auctionend
=
endtime
,
itemid
=
current_item
)
new_auction
.
save
()
new_auction
.
save
()
return
redirect
(
f
"/
startauction/{pk
}"
)
return
redirect
(
f
"/
profile/{userid
}"
)
except
:
except
:
pass
pass
...
...
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