示例#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
  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)