Newbie Zope/Python DocumentTemplate question

Gardner Pomper gardner at networknow.org
Wed May 9 05:07:20 CEST 2001


I am trying to get up to speed on Zope because of its integration with
Python. What I need to do is build an external python object and have it use
the DocumentTemplate class so that I can store the html seperately from the
python code. So far, I think I understand the concepts.

I am trying to use the examples from "The Quick Python Book". Here is the
code fragment:

import DocumentTemplate
def test(name, age) :
    template = DocumentTemplate.HTMLFile("my_template.dtml")
    return template

My problem is that when I execute the following line in my external Python
script from Zope, I get a "can't find my_template.dtml".

I am running Zope under Windows 2000, started manually. I haven't been able
to find where the dtml files should be stored. It looks like all the zope
stuff is stored internally in some file, instead of file by file in the
directory structure.

If someone can point me in the right direction, I would be *very* grateful.

- Gardner






More information about the Python-list mailing list