Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/views/generic.rss
diff options
context:
space:
mode:
Diffstat (limited to 'views/generic.rss')
-rw-r--r--views/generic.rss16
1 files changed, 16 insertions, 0 deletions
diff --git a/views/generic.rss b/views/generic.rss
new file mode 100644
index 0000000..9833a89
--- /dev/null
+++ b/views/generic.rss
@@ -0,0 +1,16 @@
+{{
+###
+# response._vars contains the dictionary returned by the controller action
+# for this to work the action must return something like
+#
+# dict(title=...,link=...,description=...,created_on='...',items=...)
+#
+# items is a list of dictionaries each with title, link, description, pub_date.
+###
+try:
+ from gluon.serializers import rss
+ response.write(rss(response._vars),escape=False)
+ response.headers['Content-Type']='application/rss+xml'
+except:
+ raise HTTP(405,'no rss')
+}} \ No newline at end of file