[Zope] Understanding dtml and/or its variables
Damir Bartakovic
db@konsylo.com
Tue, 20 Feb 2001 18:18:39 +0100
Hi all,
I am using ZnolkSQLWizard and it creates output like
<INPUT TYPE="TEXT" NAME="table.name"> ...
Now I am trying to force the user not to leave the field blank.
Usually it works with <dtml-unless "somevariable"> ... once again!
...</dtml-unless>
but with <dtml-unless "table.name"> ... I get the error:
Error Type: NameError
Error Value: table (The Traceback is at the end)
Like it seems it don't like the '.'?
But for <dtml-var table.name> I'm getting the right value.
So what I'm not understanding? How can I solve it and is it a good idea to
use '.' in variables?
Thanks
Damir
Traceback (innermost last):
File /usr/local/share/zope/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
File /usr/local/share/zope/lib/python/ZPublisher/Publish.py, line 187, in
publish
File /usr/local/share/zope/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
File /usr/local/share/zope/lib/python/ZPublisher/Publish.py, line 171, in
publish
File /usr/local/share/zope/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: html_insert)
File /usr/local/share/zope/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: html_insert)
File /usr/local/share/zope/lib/python/OFS/DTMLMethod.py, line 172, in
__call__
(Object: html_insert)
File /usr/local/share/zope/lib/python/DocumentTemplate/DT_String.py, line
528, in __call__
(Object: html_insert)
File /usr/local/share/zope/lib/python/DocumentTemplate/DT_Util.py, line
337, in eval
(Object: table.name)
(Info: table)
File <string>, line 0, in ?
NameError: (see above)