adding functionality to comment on planned sessions and races
This commit is contained in:
@@ -1737,7 +1737,7 @@ def handle_sendemailnewresponse(first_name, last_name,
|
||||
debug=False,**kwargs):
|
||||
fullemail = email
|
||||
from_email = 'Rowsandall <info@rowsandall.com>'
|
||||
subject = 'New comment on workout ' + workoutname
|
||||
subject = 'New comment on session ' + workoutname
|
||||
|
||||
comment = u''+comment
|
||||
|
||||
@@ -1745,7 +1745,14 @@ def handle_sendemailnewresponse(first_name, last_name,
|
||||
if debug:
|
||||
siteurl = SITE_URL_DEV
|
||||
|
||||
sessiontype = 'workout'
|
||||
if 'sessiontype' in kwargs:
|
||||
sessiontype=kwargs.pop('sessiontype')
|
||||
|
||||
commentlink = '/rowers/workout/{workoutid}/comment/'.format(workoutid=workoutid)
|
||||
if 'commentlink' in kwargs:
|
||||
commentlink = kwargs.pop('commentlink')
|
||||
|
||||
d = {
|
||||
'first_name':first_name,
|
||||
'commenter_first_name':commenter_first_name,
|
||||
@@ -1754,10 +1761,14 @@ def handle_sendemailnewresponse(first_name, last_name,
|
||||
'workoutname':workoutname,
|
||||
'siteurl':siteurl,
|
||||
'workoutid':workoutid,
|
||||
'commentid':commentid
|
||||
'commentid':commentid,
|
||||
'sessiontype':sessiontype,
|
||||
'commentlink':commentlink,
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,[fullemail],subject,'teamresponseemail.html',d,**kwargs)
|
||||
res = send_template_email(from_email,
|
||||
[fullemail],
|
||||
subject,'teamresponseemail.html',d,**kwargs)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -1776,7 +1787,7 @@ def handle_sendemailnewcomment(first_name,
|
||||
|
||||
fullemail = email
|
||||
from_email = 'Rowsandall <info@rowsandall.com>'
|
||||
subject = 'New comment on workout ' + workoutname
|
||||
subject = 'New comment on session ' + workoutname
|
||||
|
||||
comment = u''+comment
|
||||
|
||||
@@ -1784,7 +1795,14 @@ def handle_sendemailnewcomment(first_name,
|
||||
if debug:
|
||||
siteurl = SITE_URL_DEV
|
||||
|
||||
sessiontype = 'workout'
|
||||
if 'sessiontype' in kwargs:
|
||||
sessiontype=kwargs.pop('sessiontype')
|
||||
|
||||
commentlink = '/rowers/workout/{workoutid}/comment/'.format(workoutid=workoutid)
|
||||
if 'commentlink' in kwargs:
|
||||
commentlink = kwargs.pop('commentlink')
|
||||
|
||||
d = {
|
||||
'first_name':first_name,
|
||||
'commenter_first_name':commenter_first_name,
|
||||
@@ -1793,6 +1811,8 @@ def handle_sendemailnewcomment(first_name,
|
||||
'workoutname':workoutname,
|
||||
'siteurl':siteurl,
|
||||
'workoutid':workoutid,
|
||||
'sessiontype':sessiontype,
|
||||
'commentlink':commentlink,
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,[fullemail],subject,
|
||||
|
||||
Reference in New Issue
Block a user