[Zope] NameError, namespace-Problem?

Andreas Hölzl hoelzla@uni-freiburg.de
Thu, 20 Jun 2001 16:04:25 +0200


please allow me to post this previously posted mail again.
the underlaying problems seems to be crucial for my understanding of
Zope.

I have a serious namespace-problem when trying to put serveral
dtml/zsql-methods together in one rendering act.

the problem:

first of all i try to render a dtml-method "base_method" located in
"/root/subfolder/subsubfolder" via URL.

"base_method" is a layout template. 
inside "base_method" i call the dtml-method "db_query" located in
"/root/subfolder/db_stuff" (!) for the output of a more complex
db-query :
...
  <dtml-with db_stuff>
    <dtml-var "db_query(...)">
  </dtml-with>
...

Zope finds "db_query" in "db_stuff" and renders it, but is not able to
call zsql-methods also located in the same directory
"/root/subfolder/db_stuff".
Inside "db_query" i try:
...
<dtml-in "specific_zsql_method(...)">
...
</dtml-in>
...

i tried to fix it with "dtml-with", but
when i put "<dtml-with db_stuff>" around the in-tag, Zope can't find
"db_stuff".

so i'm quite a bit confused. If i can't use dtml-methods in
dtml-methods in ... Zope-programming seems to be useless to me!

thanks for an answer.

Andreas Hölzl