diff options
author | Leif Johansson <leifj@sunet.se> | 2012-02-02 15:12:49 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2012-02-02 15:12:49 +0100 |
commit | ef6ff581acf04d14e2f70c8800e221a38659eba9 (patch) | |
tree | f242fe59d1c0cbbc1e7e1ac8d6bef69a0c3afa05 /src/meetingtools/apps/stats | |
parent | dfec2d9ac88dded5047aa52aaede1e4c510953eb (diff) |
make it possible to look at other users stats for debugging
Diffstat (limited to 'src/meetingtools/apps/stats')
-rw-r--r-- | src/meetingtools/apps/stats/views.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/meetingtools/apps/stats/views.py b/src/meetingtools/apps/stats/views.py index 8cdee25..38f21d1 100644 --- a/src/meetingtools/apps/stats/views.py +++ b/src/meetingtools/apps/stats/views.py @@ -25,9 +25,11 @@ def _date_ts(date): return int(mktime((int(y),int(m),int(d),12,0,0,0,0,-1)))*1000 # high noon @login_required -def user(request): - (local,domain) = request.user.username.split('@') - return respond_to(request,{'text/html': 'apps/stats/user.html'},{'domain': domain}) +def user(request,username=None): + if username == None: + username = request.user.username + (local,domain) = username.split('@') + return respond_to(request,{'text/html': 'apps/stats/user.html'},{'domain': domain,'username': username}) @login_required def domain(request,domain): @@ -47,8 +49,8 @@ def room(request,rid): @login_required def user_minutes_api(request,username=None): - if username and username != request.user.username: - return HttpResponseForbidden("You can't spy on others!") + #if username and username != request.user.username: + # return HttpResponseForbidden("You can't spy on others!") if username == None: username = request.user.username |