Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
 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))
Exemplo n.º 3
0
 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))
Exemplo n.º 4
0
 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))
Exemplo n.º 5
0
 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))
Exemplo n.º 6
0
    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)
Exemplo n.º 7
0
    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)
Exemplo n.º 8
0
    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)
Exemplo n.º 9
0
    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')
Exemplo n.º 10
0
    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")
Exemplo n.º 11
0
    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')
Exemplo n.º 12
0
 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)
Exemplo n.º 13
0
 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)
Exemplo n.º 14
0
    def get(self):
        player = db.find_player(users.get_current_user().user_id())
        if player is None:
            self.redirect('/players')

        events_page(self, player)
Exemplo n.º 15
0
 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)
Exemplo n.º 16
0
 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)