[Zope] Understanding dtml and/or its variables
Philipp Auersperg
zope@philosoft.at
Wed, 21 Feb 2001 04:32:24 +0100
Hi, I know of that problem, it seems that you have an old version of Znolk,=
because in the recent versions I have removed the '.' in the field names,=
so
your solution for the future is just to download the newest Znolk version=
(0.1.3d)
from www.bluedynamics.com or www.zope.org.
---------------------------------------------------------------------
for your existing forms in the meanwhile you can help yourself with the=
following notation:
<dtml-unless "_['table.name']">
Hope it helped
Philipp Auersperg
www.bluedynamics.com
*********** REPLY SEPARATOR ***********
On 20.02.2001 at 18:18 Damir Bartakovic wrote:
>Hi all,
>
>I am using ZnolkSQLWizard and it creates output like
><INPUT TYPE=3D"TEXT" NAME=3D"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)
>
>
>_______________________________________________
>Zope maillist - Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>** No cross posts or HTML encoding! **
>(Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )