@frappe.whitelist()
def get_standard_reply(template_name, doc):
 if isinstance(doc, basestring):
  doc = json.loads(doc)
 standard_reply = frappe.get_doc(u'Standard Reply', template_name)
 return {u'subject': frappe.render_template(standard_reply.subject, doc), u'message': frappe.render_template(standard_reply.response, doc)}

@ frappe . whitelist ( ) def get_standard_reply ( template_name , doc ) : if isinstance ( doc , basestring ) : doc = json . loads ( doc ) standard_reply = frappe . get_doc ( u'Standard Reply' , template_name ) return { u'subject' : frappe . render_template ( standard_reply . subject , doc ) , u'message' : frappe . render_template ( standard_reply . response , doc ) }
returns the processed html of a standard reply with the given doc .