zulip/zproject
Steve Howell 95dc0894d8 Add /realm_activity report.
This report will eventually replace the per-realm report that is
now accessible through /activity.  In order not to disrupt Waseem,
I'm leaving the old reports around until we've polished the new
ones.

The old report does 24 different queries to get per-realm user data.
The new approach gets all the data at once, and it slices and dices
the data in Python to accomodate our slightly quirky data model.

On localhost, this is a typical query:

LOG:  duration: 5.668 ms  statement: SELECT "zerver_useractivity"."id", "zerver_useractivity"."user_profile_id", "zerver_useractivity"."client_id", "zerver_useractivity"."query", "zerver_useractivity"."count", "zerver_useractivity"."last_visit", "zerver_userprofile"."id", "zerver_userprofile"."email", "zerver_client"."id", "zerver_client"."name" FROM "zerver_useractivity" INNER JOIN "zerver_userprofile" ON ("zerver_useractivity"."user_profile_id" = "zerver_userprofile"."id") INNER JOIN "zerver_realm" ON ("zerver_userprofile"."realm_id" = "zerver_realm"."id") INNER JOIN "zerver_client" ON ("zerver_useractivity"."client_id" = "zerver_client"."id") WHERE "zerver_realm"."domain" = 'zulip.com'  ORDER BY "zerver_userprofile"."email" ASC, "zerver_useractivity"."last_visit" DESC

(imported from commit 0c71f4e32fe5a40f4496749dc29ad3463868d55e)
2013-11-01 11:46:26 -04:00
..
__init__.py Rename Django project to zproject. 2013-08-07 11:04:03 -04:00
authhack.py Rename Django project to zproject. 2013-08-07 11:04:03 -04:00
backends.py Rename Django project to zproject. 2013-08-07 11:04:03 -04:00
local_settings.py [manual] Move /etc/humbug-* files into /etc/zulip 2013-10-30 15:42:25 -04:00
local_settings_template.py Upload to local filesystem on local server. 2013-10-29 16:19:04 -04:00
settings.py Remove the onboarding checklist. 2013-10-31 11:34:15 -04:00
test_settings.py Rename humbug => zulip in some log file names. 2013-10-31 15:29:49 -04:00
urls.py Add /realm_activity report. 2013-11-01 11:46:26 -04:00
wsgi.py Some zulip => humbug updates in comments and print statements. 2013-10-08 08:57:29 -04:00