pagination django

1 view
Skip to first unread message

nicemira

unread,
Mar 25, 2009, 6:15:44 AM3/25/09
to Django developers
please friends,
how can I paginate my product with this method: I want to do a newline
after every two products
please,answer me as soon as possible

Justin Lilly

unread,
Mar 25, 2009, 9:06:50 AM3/25/09
to django-d...@googlegroups.com
This is a question more suited for django-users as this mailing list
is for the development of the core framework.

-justin

matehat

unread,
Mar 26, 2009, 9:07:59 AM3/26/09
to Django developers
Just a quick thought (though I also think the question should have
been asked on the Django-Users mailing list). The template tag {%
cycle %} allows you to alternate between any number of values
everytime it is encountered, so putting something like :

{% for product in product_list %}

// a single product presentation
{% cycle "" "<br />" %}

{% endfor %}

would probably do the job. There, the values alternated are nothing
("") and a newline ("<br />").
Reply all
Reply to author
Forward
0 new messages