Artifact f16be9a903689cd29786da877175b45b286437e6:
- File applications/examples/views/generic.rss — part of check-in [eba4a35a21] at 2011-08-08 04:53:38 on branch develop — Added web2py 1.98.2 (user: spiffy, size: 631) [annotate] [blame] [check-ins using]
{{ ### # 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 (TypeError, ValueError): raise HTTP(405, 'RSS serialization error') except ImportError: raise HTTP(405, 'RSS not available') except: raise HTTP(405, 'RSS error') }}