예제 #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)