RES: RES: [Zope] Help needed in desiging the page.

Jose Henrique dos Reis jhreis at senado.gov.br
Thu Jun 17 11:01:34 EDT 2004


Parimal,

Try this:

<table tal:define="results here/infoPython;
                   keys python: results[0].keys()">
  <tr>
    <tal:block repeat="header keys">
      <th tal:content="header"></th>
    </tal:block>
  </tr>
  <tr tal:repeat="item results">
    <tal:block repeat="key keys">
      <td tal:content="python: item[key]"></td>
    </tal:block>
  </tr>
</table>

-----Mensagem original-----
De: Parimal [mailto:parimalk at cdacindia.com]
Enviada em: quarta-feira, 16 de junho de 2004 01:32
Para: Jose Henrique dos Reis
Cc: 'zope at zope.org'
Assunto: Re: RES: [Zope] Help needed in desiging the page.


Dear Jose,


Thank you for your information.
Yes i am using page template. I have Index_html page which calls to 
infoPython which create sql string and send it to infoSQL_method as

"return 
container.ResultSql(Atte=finalString).dictionaries()

and it return me result of query. in the form of dictionary. Now i want 
to do formating to the output which is in dictionary form in to let say 
table format. how do i do that ..


Thanx in advance

parimal










Jose Henrique dos Reis wrote:

>Parimal
>
>If you're using page templates you can do this way:
>
><table tal:define="results python: here.ResultSql(Atte=finalString)" >
>  <tr tal:repeat="item results">
>    <td tal:content="item/column_name1">data</td>
>    <td tal:content="item/column_name2">data</td>
>  </tr>
></table>
>  
>



>where column_nameX are the columns of your db table.
>
>José Henrique.
>
>-----Mensagem original-----
>De: Parimal [mailto:parimalk at cdacindia.com]
>Enviada em: terça-feira, 15 de junho de 2004 03:14
>Para: Zope user list
>Assunto: [Zope] Help needed in desiging the page.
>
>
>    Dear All ,
>
>In my index_html page i am using post method and retrieving information 
>out from mysql in the form of dictionary
>The return statement is "return 
>container.ResultSql(Atte=finalString).dictionaries()"
>
>Now i need to design the out put which is in dictionary in table format. 
>can any one help me  to do the formating in the form of table
>
>Thanking you
>
>Parimal
>
>
>_______________________________________________
>Zope maillist  -  Zope at 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 )
>
>_______________________________________________
>Zope maillist  -  Zope at 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 )
>
>  
>



More information about the Zope mailing list