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):
211211 if choice_id :
212212 choice = Choice .objects .get (id = choice_id )
213213 vote = Vote (user = request .user , poll = poll , choice = choice )
214- vote .save ()
215- print (vote )
214+ vote .save ()
216215
217216 # get poll creator email
218217 poll_creator_email = poll .owner .email
219218 # Construct the email
220219 subject = f'New vote for your poll: { poll .text } '
221220 message = f'A new vote has been cast for your poll "{ poll .text } ".'
222221 # 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 ])
225223
226224 return render (request , 'polls/poll_result.html' , {'poll' : poll })
227225 else :
You can’t perform that action at this time.
0 commit comments