summaryrefslogtreecommitdiff
path: root/src/meetingtools
diff options
context:
space:
mode:
Diffstat (limited to 'src/meetingtools')
-rw-r--r--src/meetingtools/apps/stats/views.py12
-rw-r--r--src/meetingtools/urls.py4
2 files changed, 10 insertions, 6 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
diff --git a/src/meetingtools/urls.py b/src/meetingtools/urls.py
index d1a6ef2..ed541b9 100644
--- a/src/meetingtools/urls.py
+++ b/src/meetingtools/urls.py
@@ -19,7 +19,8 @@ urlpatterns = patterns('',
(r'^accounts/login?$','meetingtools.apps.auth.views.login'),
(r'^accounts/login-federated$','meetingtools.apps.auth.views.accounts_login_federated'),
(r'^accounts/logout$','meetingtools.apps.auth.views.logout'),
- (r'^(?:room|rooms)$','meetingtools.apps.room.views.user_rooms'),
+ (r'^user/?(.*)$','meetingtools.apps.room.views.list_rooms'),
+ (r'^(?:room|rooms)$','meetingtools.apps.room.views.list_rooms'),
(r'^go/(\d+)$','meetingtools.apps.room.views.go_by_id'),
(r'^go/(.+)$','meetingtools.apps.room.views.go_by_path'),
(r'^launch/(\d+)$','meetingtools.apps.room.views.launch'),
@@ -45,6 +46,7 @@ urlpatterns = patterns('',
(r'^api/stats/domain/(.+)$','meetingtools.apps.stats.views.domain_minutes_api'),
(r'^api/stats/room/(\d+)$','meetingtools.apps.stats.views.room_minutes_api'),
(r'^stats$','meetingtools.apps.stats.views.user'),
+ (r'^stats/user/(.+)$','meetingtools.apps.stats.views.user'),
(r'^stats/domain/(.+)$','meetingtools.apps.stats.views.domain'),
(r'^stats/room/(\d+)$','meetingtools.apps.stats.views.room'),
# Uncomment the next line to enable the admin: