[Zope] How do I get DocumentTemplate to work?
Andreas Jung
andreas at andreas-jung.com
Sat Aug 16 10:59:51 EDT 2003
Read lib/python/Products/PythonScripts/README.txt.
Btw. your code and your idea looks very odd.
-aj
--On Freitag, 15. August 2003 22:42 Uhr -0700 Bill Hewitt
<wphewitt at comcast.net> wrote:
> I'm trying to switch over to python from DTML......
> I've got a python Script (to see what DocumentTemplate does) that looks
> like the following:
>
> from DocumentTemplate import HTML
> template_source = """
> <html>
> <head>
> <title> <dtml-var title_or_id></title>
> </head>
> <body>
> <dtml-var content>
> </body>
> </html>
> """
> template_method = HTML(template_source)
> results = template_method(title="ThisDocument!",
> content="This is cool!!!!" )
>
> But, when I try to run it, I get:
> Error Type: ImportError
> Error Value: import of "HTMLFile" from "DocumentTemplate" is
> unauthorized. You are not allowed to access HTMLFile in this context
>
> What is it I'm doing wrong?
>
> TIA,
> WPH
>
>
>
> _______________________________________________
> Zope maillist - Zope at 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 )
More information about the Zope
mailing list