def post(self):
     gift = Gift(
         gift_from=self.request.get('gift_from', default_value="!"),
         gift_to=self.request.get('gift_to', default_value="!")
     )
     gift.put()
     self.redirect('/admin')
Beispiel #2
0
 def post(self):
     t = self.request.get('gift_to')
     f = self.request.get('gift_from')
     if t and f:
         gift = Gift(
             gift_from=self.request.get('gift_from'),
             gift_to=self.request.get('gift_to')
         )
         gift.put()
     self.redirect('/admin')
Beispiel #3
0
 def post(self):
     gift_id = self.request.get('opened_gift_id')
     
     gift = Gift.get_by_id(int(gift_id))
     gift.opened_on = datetime.now()
     gift.gift_name = self.request.get('gift_name')
     gift.put()
     
     self.redirect('/admin')
    def post(self):
        for gift_id in self.request.get_all('on_deck'):

# need to add a check for null set here
# if gift=""  ---not sure of the syntax in python yet

            gift = Gift.get_by_id(int(gift_id))
            gift.opened_on = datetime.now() 
            gift.put()
        self.redirect('/admin')