def update(self): super(ValidationTemplate, self).update() self.url = '%s/validateaccount.html?token=%s'%( self.request.application_url, self.token) principal = self.context self.to_address = mail.formataddr((principal.name, self.email))
def update(self): super(ResetPasswordTemplate, self).update() request = self.request self.date = datetime.now() remoteAddr = request.get("REMOTE_ADDR", "") forwardedFor = request.get("HTTP_X_FORWARDED_FOR", None) self.from_ip = forwardedFor and "%s/%s" % (remoteAddr, forwardedFor) or remoteAddr self.url = "%s/resetpasswordform.html?passcode=%s" % (request.application_url, self.passcode) info = self.context self.to_address = mail.formataddr((info.name, info.login))
def update(self): super(ResetPasswordTemplate, self).update() request = self.request self.date = datetime.now() remoteAddr = request.get('REMOTE_ADDR', '') forwardedFor = request.get('HTTP_X_FORWARDED_FOR', None) self.from_ip = (forwardedFor and '%s/%s' % (remoteAddr, forwardedFor) or remoteAddr) self.url = '%s/resetpassword.html/%s/'%( request.application_url, self.passcode) info = self.context self.to_address = mail.formataddr((info.name, info.login))