Example #1
0
  def get(self):
    self.server_config = server_config()
    if self.server_config.signup_email_text is None or len(self.server_config.signup_email_text) == 0:
      self.redirect_and_finish('/admin/beta/', flash = "Please set up a email text before accepting people.")
      
    key = self.request.get('key')
    candidate = LimitedBetaCandidate.get(key)
    candidate.invitation_code = random_string()
    candidate.put()
    
    data = dict(email=candidate.email, host=self.request.host, code=candidate.invitation_code)
    body = self.server_config.signup_email_text % data
    subject = self.server_config.signup_email_subject % data

    mail.send_mail('*****@*****.**', candidate.email, subject, body)
    
    self.redirect_and_finish('/admin/beta/', flash = "Accepted %s, his invite code is %s." % (candidate.email, candidate.invitation_code))
Example #2
0
 def get(self):
   key = self.request.get('key')
   candidate = LimitedBetaCandidate.get(key)
   candidate.rejected = True
   candidate.put()
   self.redirect_and_finish('/admin/beta/', flash = "Rejected %s." % candidate.email)