-
Notifications
You must be signed in to change notification settings - Fork 309
Show number of active weekly users and $ transferred in the headline of each page. #1377
Conversation
Adds 'weekly active users exchanging $' message to the top of each page.
@zwn Are the tests passing locally for you? Looks like they're failing at Travis. |
The test are failing but they fail even without the two commits. When I
But I have no idea what it is supposed to do. |
@whit537 It should be ready now. |
@@ -88,6 +88,13 @@ def add_stuff(request): | |||
request.context['github'] = github | |||
request.context['twitter'] = twitter | |||
request.context['bountysource'] = bountysource | |||
stats = gittip.db.one('SELECT nactive, transfer_volume FROM paydays ORDER BY ts_end DESC') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails with TooMany
if there is more than one payday. Probably want a LIMIT 1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should say that that's a change in the .one
API from the internal postgres.py module to the external one we're now using after #1320. Here's the docs for the version we're using now:
http://postgres-py.readthedocs.org/en/latest/#postgres.Postgres.one
@zwn Final items:
|
Actually, let's link to and change the charts in a separate pull request. I'll change the rounding on master since I can't change the branch. |
Show number of active weekly users and $ transferred in the headline of each page.
That PR was for a branch in @zwn's fork, not a branch of the main repo. Since I couldn't commit on that branch I'm doing this little bit here. This rounds nactive in addition to transfer_volume. It also reflows the db call to not use long lines.
In #1377 we rounded the dollar amount. Let's round the number of users as well.
Reticketed charts changes and link as #1401. |
!m @zwn 💃 |
excellent! |
In response to #703.