def send_job_review_message(job, user, subject_template_path, message_template_path):
 subject_template = loader.get_template(subject_template_path)
 message_template = loader.get_template(message_template_path)
 if (user.first_name or user.last_name):
  reviewer_name = '{} {}'.format(user.first_name, user.last_name)
 else:
  reviewer_name = 'Community Reviewer'
 message_context = Context({'reviewer_name': reviewer_name, 'content_object': job, 'site': Site.objects.get_current()})
 subject = subject_template.render(message_context).strip()
 message = message_template.render(message_context)
 send_mail(subject, message, settings.JOB_FROM_EMAIL, [job.email, EMAIL_JOBS_BOARD])

def send_job_review_message ( job , user , subject_template_path , message_template_path ) : subject_template = loader . get_template ( subject_template_path ) message_template = loader . get_template ( message_template_path ) if ( user . first_name or user . last_name ) : reviewer_name = '{} {}' . format ( user . first_name , user . last_name ) else : reviewer_name = 'Community Reviewer' message_context = Context ( { 'reviewer_name' : reviewer_name , 'content_object' : job , 'site' : Site . objects . get_current ( ) } ) subject = subject_template . render ( message_context ) . strip ( ) message = message_template . render ( message_context ) send_mail ( subject , message , settings . JOB_FROM_EMAIL , [ job . email , EMAIL_JOBS_BOARD ] )
helper function wrapping logic of sending the review message concerning a job .