Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
bookshare
Commits
1480dafc
Commit
1480dafc
authored
Apr 16, 2015
by
Daniel W Bond
Browse files
corrected variable locations
parent
65c90393
Changes
1
Hide whitespace changes
Inline
Side-by-side
bookshare/trades/views.py
View file @
1480dafc
...
...
@@ -261,6 +261,8 @@ class SellListing(LoginRequiredMixin, UpdateView):
# filling out fields
today
=
date
.
today
()
self
.
obj
=
self
.
get_object
()
print
self
.
obj
print
form
.
instance
.
winning_bid
form
.
instance
.
sold
=
True
form
.
instance
.
date_closed
=
today
...
...
@@ -270,7 +272,7 @@ class SellListing(LoginRequiredMixin, UpdateView):
html_email
=
get_template
(
'email/sold.html'
)
email_context
=
Context
(
{
'bidder_first_name'
:
self
.
obj
.
winning_bid
.
bidder
.
user
.
first_name
},
{
'bidder_first_name'
:
form
.
instance
.
winning_bid
.
bidder
.
user
.
first_name
},
{
'seller_name'
:
self
.
obj
.
seller
.
user
.
get_full_name
()
},
{
'listing_title'
:
self
.
obj
.
title
},
{
'seller_email'
:
self
.
obj
.
seller
.
user
.
email
},
...
...
@@ -279,7 +281,7 @@ class SellListing(LoginRequiredMixin, UpdateView):
subject
,
from_email
,
to
=
(
'Your bid has been selected on bookshare'
,
'no-reply@bookshare.srct.io'
,
self
.
winning_bid
.
bidder
.
user
.
email
)
form
.
instance
.
winning_bid
.
bidder
.
user
.
email
)
text_content
=
text_email
.
render
(
email_context
)
html_context
=
html_email
.
render
(
email_context
)
msg
=
EmailMultiAlternatives
(
subject
,
text_email
,
from_email
,
[
to
])
...
...
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