Thanks

Work now :D

Just need remove the single cuotes  ( ' )

2008/11/3 Jeff Peterson <jeff.peterson@crary.com>

Try this: tal:attributes="id string:'tr_'${repeat/item/number}"

 

 

 

--

Jeffrey D Peterson

Webmaster

Crary Industries, Inc.

 

From: Miguel Beltran R. [mailto:yourpadre@gmail.com]
Sent: Friday, October 31, 2008 8:01 PM
To: Jeff Peterson


Subject: Re: [Zope] standard_error using zpt

 

Now is working fine

After change
/standard_error to /dir/standard_error_message made the I wanted.

now the problem is
  <tr id="tr"    
     tal:repeat="item context/zsql_producto"
     tal:attributes="id python: 'tr_' + repeat['item'].number"
  >

say cannot concatenate 'str' and 'instancemethod' objects

2008/10/31 Jeff Peterson <jeff.peterson@crary.com>

Yeah, I guess I wouldn't expect that to work.  Do you have the full traceback?

 

 The standard_error_message template can be tricky.  It doesn't get called to handle every error, nor should you call it directly, I think.  AFAIK the "options" data is only available when an error, one that it handles by default, occurs.  Also, and I may be wrong I haven't played with it too much but isn't the name standard_error_message required?  I think what you want to look at is the Zope help for "tal:on-error"  There is an example there that may help.

--

Jeffrey D Peterson

Webmaster

Crary Industries, Inc.

 

From: Miguel Beltran R. [mailto:yourpadre@gmail.com]
Sent: Thursday, October 30, 2008 9:43 PM
To: Jeff Peterson
Cc: Andrew Milton; zope@zope.org


Subject: Re: [Zope] standard_error using zpt

 

Not work :(, say

Error Type: TraversalError
Error Value: ({'args': ()}, 'error_type')

::::::::::::: /a/b/muestra.pt
<div
   tal:condition="exists:request/modo"
   tal:on-error="structure context/standard_error.pt"
>
   <p
      tal:condition="python:request.modo=='nada'"
      tal:omit-tag=""
   >
      No se a ejecutado ninguna accion
   </p>
   <p
      tal:condition="python:request.modo=='ultimos'"
      tal:content="structure container/muestra_ultimos.pt"
      tal:omit-tag=""
   >  
   </p>
</div>

::::::::: /a/b/muestra_ultimos.pt
<table border="1">
  <thead>
  <tr>
     <th>Tipo</th>
     <th>Producto</th>
     <th>Nombre</th>
     <th>Presentacion</th>
     <th>Unidad</th>
     <th>Existencia</th>
     <th>Total</th>
     <th>Observaciones</th>
  <tr>
  </thead>
  <tbody>
  <tr id="tr"    
     tal:repeat="item context/zsql_producto"
     tal:attributes="id python: 'tr_' + repeat.number" <--here is the error what I want catch (how resolve?)
  >
     <td tal:content="item/tipo_producto">Tipo</td>
  </tr>
  </tbody>
</table>


::::::::::::: /standard_error.pt
<table>
   <tr>
      <th>Tipo</th> <td tal:content="options/error_type ">TipoError</td>
      <th>Valor</th> <td tal:content="options/error_value ">ValorError</td>
      <th></th> <td tal:content="options/error_tb ">tb</td>
      <th></th> <td tal:content="options/error_traceback ">Raestro en reversa</td>
      <th></th> <td tal:content="options/error_message">mensaje de error</td>
      <th></th> <td tal:content="options/error_log_url">url de error</td>
   </tr>
</table>

2008/10/30 Jeff Peterson <jeff.peterson@crary.com>

Just for independent confirmation he's right, "options" is what you want.

--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.


-----Original Message-----
From: zope-bounces@zope.org [mailto:zope-bounces@zope.org] On Behalf Of Andrew Milton
Sent: Wednesday, October 29, 2008 11:02 PM
To: Miguel Beltran R.
Cc: zope@zope.org
Subject: Re: [Zope] standard_error using zpt

+-------[ Miguel Beltran R. ]----------------------
| Hi List
|
| I remember what old versions from zope haved standard_error using DTML
| How can do it the same using ZPT?
|
| I already try:
| <td tal:content="error/type">
| <td tal:content="python: error.type">
| <td tal:content="context/error/type">

>From memory the following should be available;

options/error_type
options/error_value
options/error_tb
options/error_traceback
options/error_message
options/error_log_url


--
Andrew Milton
akm@theinternet.com.au

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )




--
________________________________________
Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida




--
________________________________________
Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida




--
________________________________________
Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida