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

All Samples(6)  |  Call(6)  |  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/prowl.py   serverherald(Download)
                'application': 'Server Herald',
                'event': 'New Server',
                'description': self.render_template('prowl', context)}
 
        response = requests.post(url, data=data)

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/webhook.py   serverherald(Download)
        response = requests.post(url,
                                 data=json.dumps(
                                     self.render_template('webhook',
                                                          context)))
        if response.status_code != 200:

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/pushover.py   serverherald(Download)
        data = {'token': app_apikey,
                'user': self.config('pushover', 'apikey'),
                'message': self.render_template('sms', context)}
        response = requests.post(url, data=data)
        if response.status_code != 200:

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/pagerduty.py   serverherald(Download)
                'event_type': 'trigger',
                'description': description,
                'details': self.render_template('pagerduty', context)}
 
        response = requests.post(url, data=json.dumps(data))

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/twilio.py   serverherald(Download)
        data = {'From': self.config('twilio', 'from'),
                'To': self.config('twilio', 'to'),
                'Body': self.render_template('sms', context)}
 
        response = requests.post(url, data=data,

src/s/e/serverherald-1-0.0.1/serverherald/notifiers/nexmo.py   serverherald(Download)
                'from': self.config('nexmo', 'from'),
                'to': self.config('nexmo', 'to'),
                'text': self.render_template('sms', context)}
 
        response = requests.post(url, data=data)