Re: [Zope] Re: Using ReStructuredText instead of StructuredDocument inside ZPT
Aloha, Thanks for pointing me to that document, that's what I needed. The example for TAL integration works just fine (with the typo fixed :-), and also renders only the actual content, without adding the whole XHTML document structure around it. cheers, John S. > In your Zope distribution files look at 'doc/RESTRUCTUREDSTEXT.txt' > (or > 'Zope/doc/RESTRUCTUREDSTEXT.txt' with Zope2.9). > > It has examples of how to use ReST with different solutions. > (There is a typo: 'restructured_test' should read 'restructured_text' > ) > > Btw, the ZReST objects method 'source_txt' gets you the source text > of > the reST document. > > E.g. this should work in your example: > > tal:define="rest_txt > python:container.client_content.some_STX_object.source_txt()" >tal:replace="structure python: > modules['Products.PythonScripts.standard'].restructured_text(rest_txt)" > /> > > > Hth, Michael > > -- > http://zope.org/Members/d2m > http://planetzope.org > > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Using ReStructuredText instead of StructuredDocument inside ZPT
John Schinnerer wrote: Aloha, huh? You should be able to extend the expression above by calling the objects render method? OK, tried that - I get a username/password prompt that won't take anything as authorized, and I end up with this error: - Site Error An error was encountered while publishing this resource. Error Type: Unauthorized Error Value: You are not allowed to access 'render' in this context -- I can post the full trace if needed, seems like overkill at this point as I assume it's some kind of general security thing with ReST Document that I simply don't know about. So now what? Even the zope instance root/owner username and PW are not accepted...?? In your Zope distribution files look at 'doc/RESTRUCTUREDSTEXT.txt' (or 'Zope/doc/RESTRUCTUREDSTEXT.txt' with Zope2.9). It has examples of how to use ReST with different solutions. (There is a typo: 'restructured_test' should read 'restructured_text' ) Btw, the ZReST objects method 'source_txt' gets you the source text of the reST document. E.g. this should work in your example: tal:define="rest_txt python:container.client_content.some_STX_object.source_txt()" tal:replace="structure python: modules['Products.PythonScripts.standard'].restructured_text(rest_txt)" /> Hth, Michael -- http://zope.org/Members/d2m http://planetzope.org ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )