summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/meetingtools/apps/room/views.py6
-rw-r--r--src/templates/apps/room/rss2.xml3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py
index 327e1ca..8163400 100644
--- a/src/meetingtools/apps/room/views.py
+++ b/src/meetingtools/apps/room/views.py
@@ -395,7 +395,7 @@ 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 . 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]),
@@ -408,13 +408,13 @@ 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 . 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]),
'application/rss+xml': 'apps/room/rss2.xml',
'text/rss': 'apps/room/rss2.xml'},
- {'title':title,'description':title ,'edit':False,'date': now,'tags': tn,'rooms':rooms.all()})
+ {'title':title,'description':title ,'edit':False,'baseurl': BASE_URL,'date': now,'tags': tn,'rooms':rooms.all()})
def _can_tag(request,tag):
if tag in ('selfcleaning','public','private'):
diff --git a/src/templates/apps/room/rss2.xml b/src/templates/apps/room/rss2.xml
index c5b3016..b60df1b 100644
--- a/src/templates/apps/room/rss2.xml
+++ b/src/templates/apps/room/rss2.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+{% load prefix %}
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
@@ -7,6 +8,8 @@
<description>{{description}}</description>
<!-- {{tags}} -->
<lastBuildDate>{{date}}</lastBuildDate>
+ <link>{{baseurl}}/room/+{{tags}}</link>
+ <link rel="self">{{baseurl}}/room/+{{tags}}.rss</link>
{% if rooms %}
{% for room in rooms %}
<item>