def get(self): player = db.find_player(users.get_current_user().user_id()) if player is None: self.redirect("/players") return events_page(self, player)
def get(self): player = db.find_player(users.get_current_user().user_id()) template_values = { 'registered': (player is not None), 'player': player } template = templates.get_template('player.html') self.response.write(template.render(template_values))
def get(self): player = db.find_player(users.get_current_user().user_id()) if player is None: self.redirect('/players') template_values = { 'players': map(lambda p: p.to_dict(), db.find_players(True)) } template = templates.get_template('info.html') self.response.write(template.render(template_values))
def post(self): event_type = self.request.get('event_type') date = self.request.get('date') time = self.request.get('time') comment = self.request.get('comment') event_date = datetime.strptime(date + ' ' + time, '%m/%d/%Y %H:%M') player = db.find_player(users.get_current_user().user_id()) db.add_event(player, event_type, event_date, comment) events_for(self, player)
def post(self): event_type = self.request.get("event_type") date = self.request.get("date") time = self.request.get("time") comment = self.request.get("comment") event_date = datetime.strptime(date + " " + time, "%m/%d/%Y %H:%M") player = db.find_player(users.get_current_user().user_id()) db.add_event(player, event_type, event_date, comment) events_for(self, player)
def post(self): user_id = users.get_current_user().user_id() first_name = self.request.get('first_name') last_name = self.request.get('last_name') psn_id = self.request.get('psn_id') list_me = self.request.get('list_me') == 'on' telegram = self.request.get('telegram') bungie = self.request.get('bungie') dtr = self.request.get('dtr') youtube = self.request.get('youtube') twitch = self.request.get('twitch') player = db.find_player(user_id) if player is None: db.add_player(user_id, first_name, last_name, psn_id, telegram, bungie, dtr, youtube, twitch, list_me) self.redirect('/') else: db.update_player(player, first_name, last_name, psn_id, telegram, bungie, dtr, youtube, twitch, list_me) self.redirect('/players')
def post(self): user_id = users.get_current_user().user_id() first_name = self.request.get("first_name") last_name = self.request.get("last_name") psn_id = self.request.get("psn_id") list_me = self.request.get("list_me") == "on" telegram = self.request.get("telegram") bungie = self.request.get("bungie") dtr = self.request.get("dtr") youtube = self.request.get("youtube") twitch = self.request.get("twitch") player = db.find_player(user_id) if player is None: db.add_player(user_id, first_name, last_name, psn_id, telegram, bungie, dtr, youtube, twitch, list_me) self.redirect("/") else: db.update_player(player, first_name, last_name, psn_id, telegram, bungie, dtr, youtube, twitch, list_me) self.redirect("/players")
def delete(self, event_id): player = db.find_player(users.get_current_user().user_id()) db.delete_event(player, event_id) events_for(self, player)
def put(self, event_id): player = db.find_player(users.get_current_user().user_id()) db.join_event(player, event_id) events_for(self, player)
def get(self): player = db.find_player(users.get_current_user().user_id()) if player is None: self.redirect('/players') events_page(self, player)