changeset 35:9e72371f86d3

fix sidebar to work with 1.5.x
author RadomirDopieralski
date Fri, 24 Oct 2008 13:40:19 +0000
parents 556748b2f296
children 918f8c5fb15e
files mandarin.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mandarin.py	Fri Oct 24 13:32:08 2008 +0000
+++ b/mandarin.py	Fri Oct 24 13:40:19 2008 +0000
@@ -142,7 +142,10 @@
         buff = StringIO.StringIO()
         request.redirect(buff)
         try:
-            page.send_page(content_only=1, content_id="sidebar")
+            try:
+                page.send_page(content_only=1, content_id="sidebar")
+            except TypeError:
+                page.send_page(request, content_only=1, content_id="sidebar")
         finally:
             request.redirect()
         return u'<div class="sidebar">%s</div>' % buff.getvalue()