[z3-checkins] r28636 - z3/Sfive/trunk
philikon at codespeak.net
philikon at codespeak.net
Sat Jun 10 18:02:34 CEST 2006
Author: philikon
Date: Sat Jun 10 18:02:27 2006
New Revision: 28636
Modified:
z3/Sfive/trunk/browser.py
Log:
last z3 compat fixes
Modified: z3/Sfive/trunk/browser.py
==============================================================================
--- z3/Sfive/trunk/browser.py (original)
+++ z3/Sfive/trunk/browser.py Sat Jun 10 18:02:27 2006
@@ -13,13 +13,17 @@
try:
from Products.Five.formlib.formbase import AddForm, EditForm
except ImportError:
- from zope.formlib import AddForm, EditForm
+ from zope.formlib.form import AddForm, EditForm
from sfive.interfaces import IPresentation
class ViewPresentation(BrowserPage):
def __call__(self):
+ # Zope 3 assumes text/plain as content type
+ response = getattr(self.request, 'RESPONSE', self.request.response)
+ response.setHeader('Content-Type', 'text/html')
+
return docutils.core.publish_string(
self.context.text,
writer = s5_html.Writer(),
@@ -28,7 +32,7 @@
'output_encoding': 'unicode',
'theme': None,
'theme_url': (absoluteURL(self.context, self.request) +
- '/++resource++s5ui')
+ '/++resource++s5ui') # this is lame
}
)
More information about the z3-checkins
mailing list