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')
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))
def post(self): user = users.get_current_user() clothes = sm.getAllClothes(user) db.delete(clothes) self.redirect('/closet')