Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
Render the template based on the data context.

Users can override by creating ~/.serverherald/templates/templatename

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/mailgun.py   serverherald(Download)
                'to': self.get_recipients(),
                'subject': self.get_subject(),
                'text': self.render_template('message', context)}
        response = requests.post(url, data=data,
                                 auth=('api', self.config('mailgun',

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/sendgrid.py   serverherald(Download)
                'from': self.config('email', 'from'),
                'subject': self.get_subject(),
                'text': self.render_template('message', context)}
 
        response = requests.post(url, data=data)

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/smtp.py   serverherald(Download)
    def notify(self, context):
        """Send email notification"""
        email = MIMEText(self.render_template('message', context))
        email['Subject'] = self.get_subject()
        email['From'] = self.config('email', 'from')