Exemplo n.º 1
0
 def get(self):
     for user in User.all():
         if user.text_opt_in:
             self.response.out.write("<b>"+user.name+"</b></br>")
             # Take three random wishes that are not from the user
             potential_wishes = [wish for wish in Wish.all() if wish.user_key != user.name]
             user_wishes = random.sample(potential_wishes, min(3, len(potential_wishes)))
             for wish in user_wishes:
                 self.response.out.write(wish.tagline+"<br>")
                 texter.send_message(user.phone_number, "Consider fulfilling " + wish.tagline + " on http://hackserendipity.appspot.com/")
Exemplo n.º 2
0
 def get(self):
     for wish in Wish.all():
         wish.delete()
     for wish in User.all():
         wish.delete()   
     self.redirect("/")