diff MoinMoin/items/__init__.py @ 1208:92d8f0777a9a

Improve handling of other data types in atom feed, also remove anchor tags from line numbers
author Shitiz Garg <mail@dragooon.net>
date Fri, 06 Jan 2012 14:29:18 +0530
parents a4ce283b0ca2
children c0eaed311e0e
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Fri Jan 06 09:48:15 2012 +0530
+++ b/MoinMoin/items/__init__.py	Fri Jan 06 14:29:18 2012 +0530
@@ -736,7 +736,12 @@
 
     _render_data_diff_text = _render_data_diff
     _render_data_diff_raw = _render_data_diff
-    _render_data_diff_atom = _render_data_diff
+    
+    def _render_data_diff_atom(self, oldrev, newrev):
+        url = url_for('frontend.get_item', _external=True, item_name=self.name, rev=newrev.revid)
+        return render_template('atom.html', url=url, 
+                               oldrev=oldrev, newrev=newrev, get='binary',
+                               content=Markup(self._render_data()))
 
     def _convert(self, doc):
         return _("Impossible to convert the data to the contenttype: %(contenttype)s",
@@ -924,7 +929,9 @@
 
 class Image(Binary):
     """ Base class for image/* """
-
+    def _render_data_diff(self, oldrev, newrev):
+        print 'test'
+        print self._internal_representation()
 item_registry.register(Image._factory, Type('image/*'))