Exemple #1
0
 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))
Exemple #2
0
 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))
Exemple #3
0
 def isValidInvitationCode(self, code):
     query = InvititionCode.all()
     query.filter("code", code)
     return query.count(1) > 0
Exemple #4
0
 def isValidInvitationCode(self, code):
     query = InvititionCode.all()
     query.filter("code", code)
     return query.count(1) > 0