changeset 1198:2aa4f4ec6a94

Minor fixes for atom feed
author Shitiz Garg <mail@dragooon.net>
date Wed, 04 Jan 2012 03:20:26 +0530
parents 98ff5e7a0bec
children a4ce283b0ca2
files MoinMoin/apps/feed/views.py MoinMoin/items/__init__.py MoinMoin/templates/atom.html
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/feed/views.py	Tue Jan 03 19:39:04 2012 +0530
+++ b/MoinMoin/apps/feed/views.py	Wed Jan 04 03:20:26 2012 +0530
@@ -96,10 +96,10 @@
                      updated=datetime.fromtimestamp(rev.meta[MTIME]),
                     )
         content = feed.to_string()
-        # Hack to add XSLT stylesheet declaration since AtomFeed doens't allow this
+        # Hack to add XSLT stylesheet declaration since AtomFeed doesn't allow this
         content = content.split("\n")
         content.insert(1, render_template('atom.html', get='xml'))
         content = "\n".join(content)
         if cid is not None:
             app.cache.set(cid, content)
-    return Response(content, content_type='application/atom+xml')
\ No newline at end of file
+    return Response(content, content_type='application/atom+xml')
--- a/MoinMoin/items/__init__.py	Tue Jan 03 19:39:04 2012 +0530
+++ b/MoinMoin/items/__init__.py	Wed Jan 04 03:20:26 2012 +0530
@@ -737,7 +737,7 @@
     _render_data_diff_text = _render_data_diff
     _render_data_diff_raw = _render_data_diff
     _render_data_diff_atom = _render_data_diff
-    
+
     def _convert(self, doc):
         return _("Impossible to convert the data to the contenttype: %(contenttype)s",
                  contenttype=request.values.get('contenttype'))
@@ -1112,7 +1112,7 @@
     def data_storage_to_internal(self, data):
         """ convert data from storage format to memory format """
         return data.decode(config.charset).replace(u'\r\n', u'\n')
- 
+
     def _get_data_diff_html(self, oldrev, newrev, template):
         from MoinMoin.util.diff_html import diff
         old_text = self.data_storage_to_internal(oldrev.data.read())
@@ -1125,14 +1125,14 @@
                                newrev=newrev,
                                diffs=diffs,
                                )
-                               
+
     def _render_data_diff_atom(self, oldrev, newrev):
         """ renders diff in HTML for atom feed """
         return self._get_data_diff_html(oldrev, newrev, 'diff_text_atom.html')
 
     def _render_data_diff(self, oldrev, newrev):
         return Markup(self._get_data_diff_html(oldrev, newrev, 'diff_text.html'))
-                                      
+
     def _render_data_diff_text(self, oldrev, newrev):
         from MoinMoin.util import diff_text
         oldlines = self.data_storage_to_internal(oldrev.data.read()).split('\n')
--- a/MoinMoin/templates/atom.html	Tue Jan 03 19:39:04 2012 +0530
+++ b/MoinMoin/templates/atom.html	Wed Jan 04 03:20:26 2012 +0530
@@ -3,5 +3,5 @@
 {%- elif get == 'comment_cont_merge' -%}
     <p style="font-size: 14px">...{{ comment }}</p> <br /> {{ content }}
 {%- elif get == 'first_revision' -%}
-    <p style='font-style: italic;'>{{ _('First revision') }}</p><br />{{ content }}
+    <p style="font-style: italic;">{{ _('First revision') }}</p><br />{{ content }}
 {%- endif -%}
\ No newline at end of file