#NEWLINE# def send_author_notification( talk ) : #NEWLINE# #INDENT# if ( not PendingEmail . already_in_queue ( talk . author . email , talk ) ) : #NEWLINE# #INDENT# pending_email = PendingEmail ( name = talk . author . username , email = talk . author . email , subject = '[talks] New comment' , body_text = render_template ( 'email/notify.txt' , name = talk . author . username , email = talk . author . email , talk = talk ) , body_html = render_template ( 'email/notify.html' , name = talk . author . username , email = talk . author . email , talk = pending_email ) , talk = talk ) #NEWLINE# db . session . add ( pending_email ) #NEWLINE# db . session . commit ( )