added comment functionality
This commit is contained in:
@@ -273,6 +273,35 @@ def handle_sendemail_invite(email,name,code,teamname,manager):
|
||||
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_sendemailnewcomment(first_name,
|
||||
last_name,
|
||||
email,
|
||||
commenter_first_name,
|
||||
commenter_last_name,
|
||||
comment,workoutname,
|
||||
workoutid):
|
||||
fullemail = first_name+' '+last_name+' <'+email+'>'
|
||||
subject = 'New comment on workout '+workoutname
|
||||
message = 'Dear '+first_name+',\n\n'
|
||||
message += commenter_first_name+' '+commenter_last_name
|
||||
message += ' has written a new comment on your workout '
|
||||
message += workoutname+'\n\n'
|
||||
message += comment
|
||||
message += '\n\n'
|
||||
message += 'You can read the comment here:\n'
|
||||
message += 'https://rowsandall.com/rowers/workout/'+str(workoutid)+'/comment'
|
||||
|
||||
email = EmailMessage(subject, message,
|
||||
'Rowsandall <info@rowsandall.com>',
|
||||
[fullemail])
|
||||
|
||||
|
||||
res = email.send()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
def handle_sendemail_request(email,name,code,teamname,requestor,id):
|
||||
fullemail = name+' <'+email+'>'
|
||||
|
||||
Reference in New Issue
Block a user