How does the divisibleby filter not serve your needs here?
<div clas="row">
{% for object in list %}
{% if forloop.counter|divisibleby:"3" and not forloop.last %}
</div>
<div class="row">
{% endif %}
{{ object }}
{% endfor %}
</div>
http://docs.djangoproject.com/en/dev/ref/templates/builtins#divisibleby
Chuck
On Thursday, May 5, 2011 at 6:30 PM, Jesus Noland wrote:
> A modulus or a row tag would not take away from the design principles
> of Django. All I want to do is just make rows based on data I am
> passing in from the related view function. I hope this can be added to
> Django very soon.
>
> Regards,
>
> On May 3, 12:42 pm, Ian Kelly <[email protected]> wrote:
> > On Tue, May 3, 2011 at 12:57 PM, Johannes Dollinger
> >
> > <[email protected]> wrote:
> > > * __mul__: Display a value of 0.42 as 42%.
> >
> > This would be better implemented as a "percentage" filter, IMO. It
> > would be a natural candidate for inclusion in django.contrib.humanize.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/django-developers?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.