Avoid using {% cycle %} for Django 1.2-1.6 compatibility
This commit is contained in:
parent
184484f851
commit
80a6875cf9
|
@ -24,7 +24,7 @@
|
|||
<tbody>
|
||||
{% for row in table.page.object_list|default:table.rows %} {# support pagination #}
|
||||
{% block table.tbody.row %}
|
||||
<tr class="{% cycle "odd" "even" %}">
|
||||
<tr class="{{ forloop.counter|divisibleby:2|yesno:"even,odd" }}"> {# avoid cycle for Django 1.2-1.6 compatibility #}
|
||||
{% for column, cell in row.items %}
|
||||
<td {{ column.attrs.td.as_html }}>{% if column.localize == None %}{{ cell }}{% else %}{% if column.localize %}{{ cell|localize }}{% else %}{{ cell|unlocalize }}{% endif %}{% endif %}</td>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue