fix the stats page (#630)
This commit is contained in:
parent
c8964b272e
commit
a2aa7353fc
1 changed files with 3 additions and 3 deletions
|
@ -78,13 +78,13 @@ def participation_stats(v):
|
||||||
"signups last 24h": users.filter(User.created_utc > day).count(),
|
"signups last 24h": users.filter(User.created_utc > day).count(),
|
||||||
"total posts": submissions.count(),
|
"total posts": submissions.count(),
|
||||||
"posting users": g.db.query(Submission.author_id).distinct().count(),
|
"posting users": g.db.query(Submission.author_id).distinct().count(),
|
||||||
"listed posts": submissions.filter_by(Submission.state_mod == StateMod.VISIBLE).filter(Submission.state_user_deleted_utc == None).count(),
|
"listed posts": submissions.filter(Submission.state_mod == StateMod.VISIBLE).filter(Submission.state_user_deleted_utc == None).count(),
|
||||||
"removed posts (by admins)": submissions.filter_by(Submission.state_mod != StateMod.VISIBLE).count(),
|
"removed posts (by admins)": submissions.filter(Submission.state_mod != StateMod.VISIBLE).count(),
|
||||||
"deleted posts (by author)": submissions.filter(Submission.state_user_deleted_utc != None).count(),
|
"deleted posts (by author)": submissions.filter(Submission.state_user_deleted_utc != None).count(),
|
||||||
"posts last 24h": submissions.filter(Submission.created_utc > day).count(),
|
"posts last 24h": submissions.filter(Submission.created_utc > day).count(),
|
||||||
"total comments": comments.filter(Comment.author_id.notin_((AUTOJANNY_ID,NOTIFICATIONS_ID))).count(),
|
"total comments": comments.filter(Comment.author_id.notin_((AUTOJANNY_ID,NOTIFICATIONS_ID))).count(),
|
||||||
"commenting users": g.db.query(Comment.author_id).distinct().count(),
|
"commenting users": g.db.query(Comment.author_id).distinct().count(),
|
||||||
"removed comments (by admins)": comments.filter_by(Comment.state_mod != StateMod.VISIBLE).count(),
|
"removed comments (by admins)": comments.filter(Comment.state_mod != StateMod.VISIBLE).count(),
|
||||||
"deleted comments (by author)": comments.filter(Comment.state_user_deleted_utc != None).count(),
|
"deleted comments (by author)": comments.filter(Comment.state_user_deleted_utc != None).count(),
|
||||||
"comments last_24h": comments.filter(Comment.created_utc > day, Comment.author_id.notin_((AUTOJANNY_ID,NOTIFICATIONS_ID))).count(),
|
"comments last_24h": comments.filter(Comment.created_utc > day, Comment.author_id.notin_((AUTOJANNY_ID,NOTIFICATIONS_ID))).count(),
|
||||||
"post votes": g.db.query(Vote.submission_id).count(),
|
"post votes": g.db.query(Vote.submission_id).count(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue