[Zope] HowTo Render txt-Files with LocalFS in PythonScript?
Max M
maxm@mxm.dk
Mon, 05 Aug 2002 20:15:33 +0200
Elena Schulz wrote:
>Hi Douwe,
>
>thanks for your help, I didn't know that LocalFS checks the ending and
>behaves accordingly. Now using
>
>print myLFS['textfile.dtml'](_.None, _)
>
>works well but another problem came up: if there is a <dtml-var id> in that
>textfile.dtml I get the following error.
>But an id-Property should be everywhere isn't it? So what to do so that the
>names in the context are found?
>
>Thanks again for your anwers and your patience,
>
>
The attributes passed to a dtml page are:
aDtmlFile(aClass, aDict, **keywordArguments)
when you pass _.None as the object it cannot look up an id, as None has no attributes.
If you are calling it from a Python script you should probably pass::
aDtmlFile(context, REQUEST)
regards Max M
--
"Sorry I would Really Like To Help More On This Project,
But Am To Busy Doing Paid Work On A Tight Deadline"
Max M