Example #1
0
 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)
Example #2
0
def makeUserAdmin(user_id, team):
  AdminToTeam(user=user_id, team=team).put()
  memcache.add(AdminToTeam.memcacheKey(user_id, team), True, 30)
Example #3
0
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))
Example #4
0
 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)
Example #5
0
def makeUserAdmin(user_id, team):
    AdminToTeam(user=user_id, team=team).put()
    memcache.add(AdminToTeam.memcacheKey(user_id, team), True, 30)
Example #6
0
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))