[Zope-CVS]
SVN: zversioning/trunk/src/versioning/demo/browser/view.py
some typos
Volker Bachschneider
vbachs at dzug.org
Mon Oct 11 08:08:10 EDT 2004
Log message for revision 27969:
some typos
Changed:
A zversioning/trunk/src/versioning/demo/browser/view.py
-=-
Added: zversioning/trunk/src/versioning/demo/browser/view.py
===================================================================
--- zversioning/trunk/src/versioning/demo/browser/view.py 2004-10-11 12:01:59 UTC (rev 27968)
+++ zversioning/trunk/src/versioning/demo/browser/view.py 2004-10-11 12:08:10 UTC (rev 27969)
@@ -0,0 +1,20 @@
+from zope.app.renderer.rest import ReStructuredTextToHTMLRenderer
+
+class RenderReST:
+ """Provide an interface for viewing a Proposal as ReST"""
+
+ def __init__(self, context, request):
+ self.context = context
+ self.request = request
+ self.title = context.title
+ self.usecase = self.render(context.usecase)
+ self.concept = self.render(context.concept)
+ self.todo = self.render(context.todo)
+ self.issues = self.render(context.issues)
+
+
+ def render(self,content):
+ """render contextattributes to ReST"""
+ html = ReStructuredTextToHTMLRenderer(content.encode('utf-8'),
+ self.request)
+ return unicode(html.render(),'utf-8')
\ No newline at end of file
More information about the Zope-CVS
mailing list