示例#1
0
 def get(self, room):
   """Shows an individual room."""
   onlines = handlers.online_users(room)
   self.render_template('rooms/show.html', {'room':room, 'messages':room.messages, 'authorizations':room.authorizations, 'onlines':onlines})
示例#2
0
 def get(self, room):
   """Returns the latest messages for a given room and the online users in json."""
   messages = models.Message.gql("WHERE room = :room AND evil > :evil", room=room, evil=int(self.request.get('evil')))
   online   = handlers.online_users(room)    
   self.render_json({'messages':messages, 'users':online})