def get(self): teams = [a.team for a in AdminToTeam.all().filter('user =', self.current_user["user_id"])] self.render_template("dashboard.html", teams=teams)
def makeUserAdmin(user_id, team): AdminToTeam(user=user_id, team=team).put() memcache.add(AdminToTeam.memcacheKey(user_id, team), True, 30)
def isUserAdmin(user_id, team): return (memcache.get(AdminToTeam.memcacheKey(user_id, team)) or (AdminToTeam.all().filter("team =", team).filter( "user =", user_id).get() is not None))
def get(self): teams = [ a.team for a in AdminToTeam.all().filter( 'user =', self.current_user["user_id"]) ] self.render_template("dashboard.html", teams=teams)