def get(self): code = ''.join(random.choice(string.ascii_lowercase + string.digits) for x in range(8)) invitation = InvititionCode(code=code) invitation.put() success_output(self, "<html><body>邀请链接:%s?invitation_code=%s</body></html>" % \ (self.request.relative_url('../register'), code))
def get(self): code = ''.join( random.choice(string.ascii_lowercase + string.digits) for x in range(8)) invitation = InvititionCode(code=code) invitation.put() success_output(self, "<html><body>邀请链接:%s?invitation_code=%s</body></html>" % \ (self.request.relative_url('../register'), code))
def isValidInvitationCode(self, code): query = InvititionCode.all() query.filter("code", code) return query.count(1) > 0