예제 #1
0
 def post(self):
     user = users.get_current_user()
     clothes = sm.getAllClothes(user)
     for cloth in clothes:
         cloth.clean = True
         cloth.numWorn = 0
         cloth.put()
     self.redirect('/closet')
예제 #2
0
 def get(self):
     user = users.get_current_user()
     url = users.create_logout_url(self.request.uri)
     clothes = sm.getAllClothes(user)
     template_values = {
         'clothes': clothes,
         'url': url,
     }
     path = os.path.abspath('templates/addItem.html')
     self.response.out.write(template.render(path, template_values))
예제 #3
0
 def post(self):
     user = users.get_current_user()
     clothes = sm.getAllClothes(user)
     db.delete(clothes)
     self.redirect('/closet')