def popularTags(): count = models.Tag.count() pag = paginate.Paginator(count) tem = jinjaEnv.get_template("popularTags.html") h = tem.render( table = popularTagsTable(pag), pag = pag, ) return h
def foos(): count = Foo.count() pag = paginate.Paginator(count) tem = jinjaEnv.get_template("foos.html") h = tem.render( count=count, pag=pag, table=foosTable(pag), ) return h
def userList(): """ list all users """ count = User.count() pag = paginate.Paginator(count) tem = jinjaEnv.get_template("userList.html") h = tem.render( count=count, pag=pag, table=userListTableH(pag), ) return h
def listFollowers(id): """ list of people who follow (id) """ user = User.getDoc(id) count = models.AccountInfo.count({'following_ids': id}) pag = paginate.Paginator(count) tem = jinjaEnv.get_template("listFollowers.html") h = tem.render( id=id, user=user, count=count, pag=pag, table=followersTableH(id, pag), ) return h
def alerts_historic() -> str: """ the current user's current alerts """ cun = permission.currentUserName() q = {'user_id': cun, 'live': False} count = models.Alert.count(q) pag = paginate.Paginator(count) tem = jinjaEnv.get_template("alerts_historic.html") h = tem.render( tabLine=alertTabLine("historic"), count=count, pag=pag, table=alertsTable(q, pag), ) return h
def listFollowing(id): """ list of people who follow (id) """ user = User.getDoc(id) ai = models.getAccountInfo(id) count = len(ai.following_ids) pag = paginate.Paginator(count) tem = jinjaEnv.get_template("listFollowing.html") h = tem.render( id=id, user=user, ai=ai, count=count, pag=pag, table=followingTableH(ai, pag), ) return h
def mostStarred(uid=None): """ list of most-starred messages """ if uid: u = userdb.User.getDoc(uid) if not u: return permission.http404() q = {'author_id': uid} else: q = {} uid = None q.update({'numStars': {'$gte': 1}}) count = models.Message.count(q) pag = paginate.Paginator(count) tem = jinjaEnv.get_template("mostStarred.html") h = tem.render( count=count, uid=uid, pag=pag, table=mostStarredTable(q, pag), ) return h