예제 #1
0
파일: validation.py 프로젝트: mcdonc/ptah
    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))
예제 #2
0
    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))
예제 #3
0
    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))