def body(self): if not self._body and self.drip_base.body_template: body = Template(self.drip_base.body_template).render(self.context) if self.drip_base.drip_model.marketing is True: c = Subscription.for_user(self.user).unsubscribe_code link = 'https://getsiphon.com/drip/unsubscribe/?code=%s' % c body += '<br /><br /><a href="%s">Unsubscribe from future emails</a>' % link self._body = body return self._body
def body(self): if not self._body: body = Template(self.drip_base.body_template).render(self.context) if self.drip_base.drip_model.marketing is True: body += '\n\n' body += '------------------------------' * 2 c = Subscription.for_user(self.user).unsubscribe_code link = 'https://getsiphon.com/drip/unsubscribe/?code=%s' % c body += '\n\n** Unsubscribe: %s' % link self._body = body return self._body
def plain(self): if not self._plain: plain = Template(self.drip_base.plain_template).render(self.context) if self.drip_base.drip_model.marketing is True: plain += '\n\n' plain += '-----------------------------' c = Subscription.for_user(self.user).unsubscribe_code link = 'https://getsiphon.com/drip/unsubscribe/?code=%s' % c plain += '\n\n** Unsubscribe: %s' % link self._plain = plain return self._plain
def plain(self): if not self._plain: plain = Template(self.drip_base.plain_template).render( self.context) if self.drip_base.drip_model.marketing is True: plain += '\n\n' plain += '-----------------------------' c = Subscription.for_user(self.user).unsubscribe_code link = 'https://getsiphon.com/drip/unsubscribe/?code=%s' % c plain += '\n\n** Unsubscribe: %s' % link self._plain = plain return self._plain