group_by snippet separating grouped objects

1
2
3
4
5
6
7
8
9
 {% for image in images %}
	{% if forloop.counter0|divisibleby:"4" %}
        separator
	{% endif %}
        {{ image }}
	{% if forloop.counter|divisibleby:"4" %}
	end separator
	{% endif %}
 {% endfor %}

More like this

  1. Group sequence into rows and columns for a TABLE by davidwtbuxton 2 years, 3 months ago
  2. FieldsetForm by Ciantic 6 years, 1 month ago
  3. Fetching top items by ubernostrum 6 years, 2 months ago
  4. User groups template tag by hijinks 3 years, 11 months ago
  5. Custom SQL via subquery by drg006 6 years ago

Comments

(Forgotten your password?)