Example #1
0
  def board_increment():
    board_db = BoardCounter.get_by_key_name(board)

    if not board_db:
      board_db = BoardCounter(key_name = board, thread = [])

    board_db.counter += 1
    board_db.put()

    return board_db.counter
Example #2
0
File: api.py Project: a37912/gaeaib
  def get(self):
    boardq = BoardCounter.all()

    return json_response(
        [
          {
            "code":board.code,
            "name":board.name,
            "last" : board.counter,
          }
          for board in boardq
        ]
    )
Example #3
0
File: api.py Project: a37912/gaeaib
  def load(self, lim=None):
    boardq = BoardCounter.all(keys_only=True)
    boardq.order("-date_modify")
    boardq.filter("old", True)

    if not lim:
      lim = self.DEF_COUNT

    return [
          k.name() 
          for k in boardq.fetch(lim)
          if k.name() not in self.BOARDS
    ]
Example #4
0
File: api.py Project: a37912/gaeaib
  def get(self, board):
    board = BoardCounter.get_by_key_name(board)

    return json_response(board.counter if board else None)