comparison MoinMoin/items/__init__.py @ 1210:d5c6c9ada478

Fix incorrect URL while fetching images' diff
author Shitiz Garg <mail@dragooon.net>
date Fri, 06 Jan 2012 17:33:34 +0530
parents c0eaed311e0e
children e63c9c8d0ad9
comparison
equal deleted inserted replaced
1209:c0eaed311e0e 1210:d5c6c9ada478
1044 1044
1045 def _render_data_diff_atom(self, oldrev, newrev): 1045 def _render_data_diff_atom(self, oldrev, newrev):
1046 if PIL is None: 1046 if PIL is None:
1047 # no PIL, we can't do anything, we just call the base class method 1047 # no PIL, we can't do anything, we just call the base class method
1048 return super(TransformableBitmapImage, self)._render_data_diff_atom(oldrev, newrev) 1048 return super(TransformableBitmapImage, self)._render_data_diff_atom(oldrev, newrev)
1049 url = url_for('frontend.get_item', _external=True, item_name=self.name, rev=newrev.revid) 1049 url = url_for('frontend.diffraw', _external=True, item_name=self.name, rev1=oldrev.revid, rev2=newrev.revid)
1050 return render_template('atom.html', 1050 return render_template('atom.html',
1051 oldrev=oldrev, newrev=newrev, get='binary', 1051 oldrev=oldrev, newrev=newrev, get='binary',
1052 content=Markup('<img src="{0}" />'.format(escape(url)))) 1052 content=Markup('<img src="{0}" />'.format(escape(url))))
1053 1053
1054 def _render_data_diff(self, oldrev, newrev): 1054 def _render_data_diff(self, oldrev, newrev):