def post(self, log_id): user = users.get_current_user() date_attended = datetime.datetime.strptime(self.request.POST['date'], '%Y-%m-%d').date() tags = self.request.POST.get('tags', '').split(',') tags = filter(lambda tag: len(tag) > 0, tags) notes = self.request.POST.get('notes', None) rating = self.request.POST.get('rating', None) category = self.request.POST.get('category', None) url = self.request.POST.get('url', None) if rating: rating = int(rating) bechdel_test = forms.bechdel_test(self.request.POST) queries.log(user, self.request.POST['name'], date_attended, tags=tags, rating=rating, notes=notes, log_id=log_id, category=category, url=url, bechdel_test=bechdel_test) return webapp2.redirect('/log/'+log_id)
def post(self): #logging.info(self.request.POST) user = users.get_current_user() date_played = datetime.datetime.strptime(self.request.POST['date'], '%Y-%m-%d').date() tags = self.request.POST.get('tags', '').split(',') tags = filter(lambda tag: len(tag) > 0, tags) notes = self.request.POST.get('notes', None) category = self.request.POST.get('category', None) rating = self.request.POST.get('rating', None) rating = int(rating) if rating else None #logging.info(rating) url = self.request.POST.get('url', None) #logging.info(url) bechdel_test = forms.bechdel_test(self.request.POST) logging.info(bechdel_test) queries.log(user, self.request.POST['name'], date_played, tags=tags, rating=rating, notes=notes, category=category, url=url, bechdel_test=bechdel_test) return webapp2.redirect('/home')
def post(self, log_id): user = users.get_current_user() date_attended = datetime.datetime.strptime(self.request.POST['date'], '%Y-%m-%d').date() tags = self.request.POST.get('tags', '').split(',') tags = filter(lambda tag: len(tag) > 0, tags) notes = self.request.POST.get('notes', None) rating = self.request.POST.get('rating', None) category = self.request.POST.get('category', None) url = self.request.POST.get('url', None) if rating: rating = int(rating) bechdel_test = forms.bechdel_test(self.request.POST) violence_against_women = forms.violence_against_women(self.request.POST) queries.log(user, self.request.POST['name'], date_attended, tags=tags, rating=rating, notes=notes, log_id=log_id, category=category, url=url, bechdel_test=bechdel_test, violence_against_women=violence_against_women) return webapp2.redirect('/log/'+log_id)