diff options
author | Leif Johansson <leifj@sunet.se> | 2011-05-30 11:17:02 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2011-05-30 11:17:02 +0200 |
commit | 1866e375b69aecb53b617da8993fc71c798af8f4 (patch) | |
tree | d93eaf3f65b6a72763874815be18215353695500 /src/meetingtools | |
parent | db3632c30e9262adbe7a35be404ace0436a20271 (diff) |
A simple jquery-based widget for disaplaying stuff from meetingtools.
Diffstat (limited to 'src/meetingtools')
-rw-r--r-- | src/meetingtools/apps/room/views.py | 13 | ||||
-rw-r--r-- | src/meetingtools/urls.py | 1 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py index 6c22c14..e253d87 100644 --- a/src/meetingtools/apps/room/views.py +++ b/src/meetingtools/apps/room/views.py @@ -388,21 +388,12 @@ def _goto(request,room,clean=True,promote=False): def _room2dict(room): return {'name':room.name, 'description':room.description, - 'user_count':room.user_count, + 'user_count':room.nusers(), + 'host_count':room.nhosts(), 'updated': rfc3339_date(room.lastupdated), 'self_cleaning': room.self_cleaning, 'url': room.go_url()} -@login_required -def widget(request,tn): - tags = tn.split('+') - rooms = TaggedItem.objects.get_by_model(Room, tags) - title = 'Rooms tagged with %s' % " and ".join(tags) - now = timeAsrfc822( datetime.now() ) - return respond_to(request, - {'text/html':'apps/room/widget-test.html'}, - {'title':title,'description':title ,'edit':False,'date': now,'tags': tn,'rooms':rooms.all()}) - # should not require login def list_by_tag(request,tn): tags = tn.split('+') diff --git a/src/meetingtools/urls.py b/src/meetingtools/urls.py index ec10376..703b49a 100644 --- a/src/meetingtools/urls.py +++ b/src/meetingtools/urls.py @@ -31,7 +31,6 @@ urlpatterns = patterns('', (r'^room/(\d+)/tag$','meetingtools.apps.room.views.tag'), (r'^room/(\d+)/untag/(.+)$','meetingtools.apps.room.views.untag'), (r'^room/(\d+)/recordings$','meetingtools.apps.room.views.recordings'), - (r'^widget/\+(.+)$','meetingtools.apps.room.views.widget'), (r'^room/\+(.+)\.(?:json|html|htm)$','meetingtools.apps.room.views.list_by_tag'), (r'^room/\+(.+)\.(?:atom)$',RoomAtomTagFeed()), (r'^room/\+(.+)\.(?:rss)$',RoomRSSTagField()), |