Re: [Zope-dev] ZPT 1.2, TAL 1.2, ZTUtils 1.0 Released

2001-04-29 Thread Frank Sonnemans

Evan,

This update breaks my previously working code. My site master template 
calls a dtml component to render a simple menu. This worked with the 
previous release of ZPT, but now results in a Name Error for the PARENTS[] 
variable. What changed in the new release to cause this and how are we now 
supposed to call dtml-components to avoid this problem. (Output Trace, 
dtml-code and object call syntax below)

Regards,

Frank

exceptions.NameError on PARENTS in 

Traceback (innermost last):
  File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 222, in 
publish_module
  File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 187, in 
publish
  File /usr/local/www/Zope/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
(Object: Traversable)
  File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 171, in 
publish
  File /usr/local/www/Zope/lib/python/ZPublisher/mapply.py, line 160, in 
mapply
(Object: index_html)
  File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 112, in 
call_object
(Object: index_html)
  File /usr/local/www/Zope/lib/python/Shared/DC/Scripts/Bindings.py, line 
324, in __call__
(Object: index_html)
  File /usr/local/www/Zope/lib/python/Shared/DC/Scripts/Bindings.py, line 
353, in _bindAndExec
(Object: index_html)
  File 
/usr/local/www/Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py, 
line 247, in _exec
(Object: index_html)
  File 
/usr/local/www/Zope/lib/python/Products/PageTemplates/PageTemplate.py, line 
155, in pt_render
(Object: index_html)
(Info: {'container': Folder instance at 89d5900,
 'here': Folder instance at 89d5900,
 'modules': Products.PageTemplates.ZopePageTemplate._SecureModuleImporter 
instance at 8a28640,
 'nothing': None,
 'options': {'args': ()},
 'request': h3form/h3table/tableh3cookies/h3tabletr 
valign=top 
align=leftthtree-s/thtd'eJyLjlZ3hAJXbQtb9dhYACzMBKw'/td/trtr 
valign=top 
align=leftthchuckmIMPlang/thtd'en'/td/tr/tableh3other/h3
tabletr valign=top 
align=leftthAUTHENTICATION_PATH/thtd''/td/trtr valign=top 
align=leftthchuckmIMPlang/thtd'en'/td/trtr valign=top 
align=leftthURL3/thtd'http://209.48.159.60:8080'/td/trtr 
valign=top 
align=leftthURL0/thtd'http://209.48.159.60:8080/umle/Products/inde
x_html'/td/trtr valign=top 
align=leftthBASE3/thtd'http://209.48.159.60:8080/umle/Products'/t
d/trtr valign=top 
align=leftthURL2/thtd'http://209.48.159.60:8080/umle'/td/trtr 
valign=top 
align=leftthBASE1/thtd'http://209.48.159.60:8080'/td/trtr 
valign=top align=leftthtraverse_subpath/thtd[]/td/trtr 
valign=top 
align=leftthURL1/thtd'http://209.48.159.60:8080/umle/Products'/td
/trtr valign=top 
align=leftthSERVER_URL/thtd'http://209.48.159.60:8080'/td/trt
r valign=top 
align=leftthtree-s/thtd'eJyLjlZ3hAJXbQtb9dhYACzMBKw'/td/trtr 
valign=top 
align=leftthURL/thtd'http://209.48.159.60:8080/umle/Products/index
_html'/td/trtr valign=top 
align=leftthAUTHENTICATED_USER/thtdadmin/td/trtr valign=top 
align=leftthPUBLISHED/thtdlt;ZopePageTemplate instance at 
8a9a6e0gt;/td/trtr valign=top 
align=leftthTraversalRequestNameStack/thtd[]/td/trtr 
valign=top 
align=leftthBASE2/thtd'http://209.48.159.60:8080/umle'/td/trt
r valign=top 
align=leftthBASE0/thtd'http://209.48.159.60:8080'/td/trtr 
valign=top 
align=leftthBASE4/thtd'http://209.48.159.60:8080/umle/Products/ind
ex_html'/td/trtr valign=top 
align=leftthURL0/thtdhttp://209.48.159.60:8080/umle/Products/index
_html/td/trtr valign=top 
align=leftthURL1/thtdhttp://209.48.159.60:8080/umle/Products/td
/trtr valign=top 
align=leftthURL2/thtdhttp://209.48.159.60:8080/umle/td/trtr 
valign=top 
align=leftthURL3/thtdhttp://209.48.159.60:8080/td/trtr 
valign=top 
align=leftthBASE0/thtdhttp://209.48.159.60:8080/td/trtr 
valign=top 
align=leftthBASE1/thtdhttp://209.48.159.60:8080/td/trtr 
valign=top 
align=leftthBASE2/thtdhttp://209.48.159.60:8080/umle/td/trtr 
valign=top 
align=leftthBASE3/thtdhttp://209.48.159.60:8080/umle/Products/td
/trtr valign=top 
align=leftthBASE4/thtdhttp://209.48.159.60:8080/umle/Products/inde
x_html/td/tr/tableh3environ/h3tabletr valign=top 
align=leftthHTTP_ACCEPT_ENCODING/thtdgzip, deflate/td/trtr 
valign=top 
align=leftthchannel.creation_time/thtd988533067/td/trtr 
valign=top align=leftthSERVER_PROTOCOL/thtd1.1/td/trtr 
valign=top align=leftthSERVER_PORT/thtd8080/td/trtr 
valign=top align=leftthPATH_INFO/thtd/umle/Products/td/trtr 
valign=top 
align=leftthHTTP_HOST/thtd209.48.159.60:8080/td/trtr 
valign=top align=leftthREQUEST_METHOD/thtdGET/td/trtr 
valign=top 
align=leftthPATH_TRANSLATED/thtd/umle/Products/td/trtr 
valign=top 
align=leftthHTTP_COOKIE/thtdtree-s=quot;eJyLjlZ3hAJXbQtb9dhYACzMB
Kwquot;; chuckmIMPlang=en; 
tree-s=quot;eJzTiFZ3hANPW/VYHU0ALlYElAquot;/td/trtr valign=top 
align=leftthSCRIPT_NAME/thtd/td/trtr valign=top 
align=leftthSERVER_SOFTWARE/thtdZope/Zope 2.3.0 (source release, 
python 1.5.2, linux2) ZServer/1.1b1/td/trtr valign=top 

Re: [Zope-dev] ZPT 1.2, TAL 1.2, ZTUtils 1.0 Released

2001-04-29 Thread Evan Simpson

From: Frank Sonnemans [EMAIL PROTECTED]
 This update breaks my previously working code. My site master template
 calls a dtml component to render a simple menu. This worked with the
 previous release of ZPT, but now results in a Name Error for the
PARENTS[]
 variable. What changed in the new release to cause this and how are we
now
 supposed to call dtml-components to avoid this problem. (Output Trace,
 dtml-code and object call syntax below)

The most reliable way to call DTML from ZPT is using a Python
expression, so that you can explicitly pass the client object and
request mapping.  Try something like this:

tal:define=result here.my_dtml(None, request)

or

tal:define=result here.my_dtml(here, request)

The problem that you're having is a change in the implicit DTML call
code to make ZPT variables available to called DTML code.

Cheers,

Evan @ digicool


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] ZPT 1.2, TAL 1.2, ZTUtils 1.0 Released

2001-04-27 Thread Evan Simpson

Actually, I uploaded these at 5pm today, then I had to run and catch a
plane.  I still haven't updated the Project wiki, but if you visit:

http://www.zope.org/Members/4am/ZPT

...you can pick up the latest.  You need to download all three;
PageTemplates goes in a Products directory, TAL and ZTUtils go in
'lib/python'.

There's a trio of example Page Templates (with support data) that you
can try out by copying PageTemplates/examples/zpt_examples.zexp into
your import directory and importing it somewhere.  One of them shows off
batching, another shows how to make a tree widget, and the third calls
DTML from ZPT.

Cheers,

Evan @ digicool


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )