Changes between Version 2 and Version 3 of ColumnizeTag


Ignore:
Timestamp:
04/20/08 04:21:50 (7 years ago)
Author:
itai@…
Comment:

Comment and bug fix

Legend:

Unmodified
Added
Removed
Modified
  • ColumnizeTag

    v2 v3  
    170170register.tag('columnize', columnize)
    171171}}}
     172
     173== A small comment / correction... ==
     174
     175Very nice and useful, but produces broken HTML (missing </tr> on last row) if the last row is unfilled (number of cells % columns != 0).
     176
     177Fix that seems to work for me - replace two lines before the last 'return' with:
     178
     179{{{
     180        forloop = context['forloop']
     181        if self.counter == self.columns or forloop['last'] and forloop['counter0'] % self.columns != (self.columns - 1):
     182            output += '</tr>'
     183}}}
Back to Top