File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -211,17 +211,15 @@ def poll_vote(request, poll_id):
211
211
if choice_id :
212
212
choice = Choice .objects .get (id = choice_id )
213
213
vote = Vote (user = request .user , poll = poll , choice = choice )
214
- vote .save ()
215
- print (vote )
214
+ vote .save ()
216
215
217
216
# get poll creator email
218
217
poll_creator_email = poll .owner .email
219
218
# Construct the email
220
219
subject = f'New vote for your poll: { poll .text } '
221
220
message = f'A new vote has been cast for your poll "{ poll .text } ".'
222
221
# Send the email
223
- send_mail (subject , message , settings .EMAIL_HOST_USER , [poll_creator_email ])
224
- print ("Mail sent successfully to" + poll .owner .email )
222
+ send_mail (subject , message , settings .EMAIL_HOST_USER , [poll_creator_email ])
225
223
226
224
return render (request , 'polls/poll_result.html' , {'poll' : poll })
227
225
else :
You can’t perform that action at this time.
0 commit comments