summaryrefslogtreecommitdiff
path: root/src/meetingtools/apps/room
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2011-05-12 22:54:11 +0200
committerLeif Johansson <leifj@sunet.se>2011-05-12 22:54:11 +0200
commit4f49f3d6f597979523e0ed96b41b55c70a4594cd (patch)
treeac26a99cad481ff1e4e0b66f44f4acce5ea4d457 /src/meetingtools/apps/room
parentbc7bceea9da58161a634a20625044299f2731784 (diff)
duplicate
Diffstat (limited to 'src/meetingtools/apps/room')
-rw-r--r--src/meetingtools/apps/room/views.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py
index dd22711..2925853 100644
--- a/src/meetingtools/apps/room/views.py
+++ b/src/meetingtools/apps/room/views.py
@@ -387,17 +387,12 @@ def _room2dict(room):
'self_cleaning': room.self_cleaning,
'url': room.go_url()}
-def timeAsrfc822 ( theTime ) :
- import rfc822
- return rfc822 . formatdate ( rfc822 . mktime_tz ( rfc822 . parsedate_tz ( theTime . strftime ( "%a, %d %b %Y %H:%M:%S" ) ) ) )
-
-
@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() )
+ now = timeAsrfc822( datetime.now() )
return respond_to(request,
{'text/html':'apps/room/widget-test.html',
'application/json': json_response([_room2dict(room) for room in rooms]),
@@ -410,7 +405,7 @@ def list_by_tag(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() )
+ now = timeAsrfc822( datetime.now())
return respond_to(request,
{'text/html':'apps/room/list.html',
'application/json': json_response([_room2dict(room) for room in rooms]),