web/views/baseviews.py
changeset 1429 1d2a05685233
parent 1427 b31f7abc3fdc
child 1430 708233d644da
equal deleted inserted replaced
1428:e3a2c31ae897 1429:1d2a05685233
   688 
   688 
   689     def _open(self):
   689     def _open(self):
   690         req = self.req
   690         req = self.req
   691         self.w(u'<?xml version="1.0" encoding="%s"?>\n' % req.encoding)
   691         self.w(u'<?xml version="1.0" encoding="%s"?>\n' % req.encoding)
   692         self.w(u'''<rss version="2.0"
   692         self.w(u'''<rss version="2.0"
   693  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       
   694  xmlns:dc="http://purl.org/dc/elements/1.1/"
   693  xmlns:dc="http://purl.org/dc/elements/1.1/"
   695 >''')
   694 >\n''')
   696         self.w(u'  <channel rdf:about="%s">\n' % html_escape(req.url()))
   695         self.w(u'  <channel>\n')
   697         self.w(u'    <title>%s RSS Feed</title>\n' % html_escape(self.page_title()))
   696         self.w(u'    <title>%s RSS Feed</title>\n' % html_escape(self.page_title()))
   698         self.w(u'    <description>%s</description>\n' % html_escape(req.form.get('vtitle', '')))
   697         self.w(u'    <description>%s</description>\n' % html_escape(req.form.get('vtitle', '')))
   699         params = req.form.copy()
   698         params = req.form.copy()
   700         params.pop('vid', None)
   699         params.pop('vid', None)
   701         self.w(u'    <link>%s</link>\n' % html_escape(self.build_url(**params)))
   700         self.w(u'    <link>%s</link>\n' % html_escape(self.build_url(**params)))
   719     date_format = '%%Y-%%m-%%dT%%H:%%M%+03i:00' % (timezone / 3600)
   718     date_format = '%%Y-%%m-%%dT%%H:%%M%+03i:00' % (timezone / 3600)
   720     add_div_section = False
   719     add_div_section = False
   721 
   720 
   722     def cell_call(self, row, col):
   721     def cell_call(self, row, col):
   723         entity = self.complete_entity(row, col)
   722         entity = self.complete_entity(row, col)
   724         self.w(u'<item rdf:about="%s">\n' % html_escape(entity.absolute_url()))
   723         self.w(u'<item>\n')
       
   724         self.w(u'<guid isPermaLink="true">%s</guid>\n' % html_escape(entity.absolute_url()))
   725         self.render_title_link(entity)
   725         self.render_title_link(entity)
   726         self._marker('description', html_escape(entity.dc_description()))
   726         self._marker('description', html_escape(entity.dc_description()))
   727         self._marker('dc:date', entity.dc_date(self.date_format))
   727         self._marker('dc:date', entity.dc_date(self.date_format))
   728         self.render_entity_creator(entity)
   728         self.render_entity_creator(entity)
   729         self.w(u'</item>\n')
   729         self.w(u'</item>\n')