BEAUTIFY is not smart enough

{{
  import random
  data = [(i,random.random()) for i in range(random.randint(100,200))]
  n=int((len(data)+2)/n)
  i=0
}}

<table>
{{for r in range(n):}}
  <tr>
  {{for c in range(3):}}
    <td>{{=data[i][0] if i<len(data) else ''}}</td>
    <td>{{=data[i][1] if i<len(data) else ''}}</td>
    {{i=i+1}}{{pass}}
  </tr>
  {{pass}}
</table>

On Apr 28, 2:23 pm, mart <msenecal...@gmail.com> wrote:
> Hi,
>
> I have the db tables with only 2 or 3 fields (like name/value pairs),
> I was looking to  display the contents in a more condensed fashion,
> like maybe split the table in multiple columns. Maybe something like
> this :
>
> Column_1            column_2             column_3
> name | value        name | value       name | value
> name | value        name | value       name | value
> name | value        name | value       name | value
> name | value        name | value       name | value
> name | value        name | value       name | value
> name | value        name | value       name | value
>
> is there a quick and dirty way of doing that already? (can be
> plugin_wiki, or anything else, I'm not that fussy :) )
>
> any help would be appreciated!
>
> Thanks,
> Mart :)

Reply via email to