def joinAllPrivateRooms(user): database.connect() clients = (Client.select().where((Client.owner == user) & (Client.private))) for client in clients: socketio.join_room("client_{}".format(client.id)) database.close()
def userClients(): clients = Client.select().where(Client.owner == g.user) return render_template("/user/clients.html", clients=clients)