Re: making two-column table from one-column data

2007-12-02 Thread andrej kesely
Thanks for your reply, I really like the general iterator approach. This recipe will definitely go to my personal "standard" library. A. On Dec 2, 11:09 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > If your data is in the 'data' context variable, then try this: > > > > > {% for

Re: making two-column table from one-column data

2007-12-02 Thread Tim Chase
> If your data is in the 'data' context variable, then try this: > > > {% for d in data %} > {% if forloop.counter0|divisibleby:"2" %}{% endif %} > {{d}} > {% if forloop.counter|divisibleby:"2" %}{% endif %} > {% endfor %} > {%

Re: making two-column table from one-column data

2007-12-02 Thread Ned Batchelder
If your data is in the 'data' context variable, then try this: {% for d in data %} {% if forloop.counter0|divisibleby:"2" %}{% endif %} {{d}} {% if forloop.counter|divisibleby:"2" %}{% endif %} {% endfor %} {% if

Re: making two-column table from one-column data

2007-12-02 Thread J. Clifford Dyer
On Sun, 2007-12-02 at 03:05 -0800, andrej kesely wrote: > hi, > i have small question: > suppose i have data in QuerySet - ['A', 'B', 'C', 'D', 'E', 'F', > 'G']. > I want make from this set two-column table in my template: > > AB > CD > EF > G > > What is the fastest way to

Re: making two-column table from one-column data

2007-12-02 Thread [EMAIL PROTECTED]
On Dec 2, 1:05 pm, andrej kesely <[EMAIL PROTECTED]> wrote: > hi, > i have small question: > suppose i have data in QuerySet - ['A', 'B', 'C', 'D', 'E', 'F', > 'G']. > I want make from this set two-column table in my template: > > AB > CD > EF > G > > What is the fastest way

making two-column table from one-column data

2007-12-02 Thread andrej kesely
hi, i have small question: suppose i have data in QuerySet - ['A', 'B', 'C', 'D', 'E', 'F', 'G']. I want make from this set two-column table in my template: AB CD EF G What is the fastest way to do it? I don't want split the QuerySet in my views to something like this: [(A,