コード例 #1
0
ファイル: main.py プロジェクト: Lessig2016/teams
  def get(self):    
    if self.logged_in:
      return self.redirect("/dashboard")
    
    offset = int(self.request.get("offset") or 0)
    limit = int(self.request.get("limit") or 5)
    orderBy = self.request.get("orderBy") or "-num_pledges"
    
    teams, prev_link, next_link = leaderboardGetter(offset, limit, orderBy)

    self.render_template("login.html", teams=teams,
        prev_link=prev_link, next_link=next_link, orderBy=orderBy)
コード例 #2
0
ファイル: main.py プロジェクト: inmomentsoftware/teams
  def get(self):
    offset = int(self.request.get("offset") or 0)
    limit = int(self.request.get("limit") or 25)
    orderBy = self.request.get("orderBy") or "-totalCents"

    edit_url=None
    if self.logged_in:
      edit_url = self.pledge_root_url
        
    teams, prev_link, next_link = leaderboardGetter(offset, limit, orderBy)
    self.render_template("leaderboard.html", teams=teams,
      prev_link=prev_link, next_link=next_link, orderBy=orderBy)
コード例 #3
0
    def get(self):
        if self.logged_in:
            return self.redirect("/dashboard")

        offset = int(self.request.get("offset") or 0)
        limit = int(self.request.get("limit") or 5)
        orderBy = self.request.get("orderBy") or "-num_pledges"

        teams, prev_link, next_link = leaderboardGetter(offset, limit, orderBy)

        self.render_template("login.html",
                             teams=teams,
                             prev_link=prev_link,
                             next_link=next_link,
                             orderBy=orderBy)
コード例 #4
0
    def get(self):
        offset = int(self.request.get("offset") or 0)
        limit = int(self.request.get("limit") or 25)
        orderBy = self.request.get("orderBy") or "-totalCents"

        edit_url = None
        if self.logged_in:
            edit_url = self.pledge_root_url

        teams, prev_link, next_link = leaderboardGetter(offset, limit, orderBy)
        self.render_template("leaderboard.html",
                             teams=teams,
                             prev_link=prev_link,
                             next_link=next_link,
                             orderBy=orderBy,
                             edit_url=edit_url)