Ejemplo n.º 1
0
 def get_target(self, mail):
     """
     gets the link target by evaluating the string using the email content
     """
     from pennyrev.models import Newsletter
     if self.identifier != '':
         return Newsletter.get_view_link(self.identifier)
     template = Template(self.link_target)
     return template.render(Context(mail.get_context()))