djangosnippets.org: Latest snippets tagged with 'columns'https://djangosnippets.org/tags/columns/2012-01-20T04:44:48-06:00Template filter that divides a list into exact columns2012-01-20T04:44:48-06:00davmuzhttps://djangosnippets.org/snippets/2652/<p>Template filter that divides a list into an exact number of columns.
The number of columns is guaranteed.</p>
<p>Example (list == [1,2,3,4,5,6,7,8,9,10]):</p>
<pre><code>{% for column in list|columns:3 %}
&lt;ul&gt;
{% for item in column %}
&lt;li&gt;{{ item }}&lt;/li&gt;
{% endfor %}
&lt;/ul&gt;
{% endfor %}
</code></pre>
<p>Result ...</p>
Freely redistributableCheckboxSelectMultiple that renders in columns2010-10-18T17:30:29-05:00rfuggerhttps://djangosnippets.org/snippets/2236/<p>This is a CheckboxSelectMultiple widget that will render its choices divided evenly into multiple ul elements that can be styled nicely into columns. Pass in a css class to the constructor to be assigned to the ul's.
</p>
<p>See also: http://code.djangoproject.com/ticket/9230
</p>
Freely redistributableList divide columns across2009-05-17T23:50:51-05:00Leonhttps://djangosnippets.org/snippets/1511/<p>I wanted a way to make columns but have them in floated uls...</p>
Freely redistributableWTForm (What The Form)2007-05-03T13:52:06-05:00chrjhttps://djangosnippets.org/snippets/214/<p>WTForm is an extension to the django newforms library allowing
the developer, in a very flexible way, to layout the form
fields using fieldsets and columns</p>
<p>WTForm was built with the well-documented <a href="http://developer.yahoo.com/yui/grids/">YUI Grid CSS</a> in
mind when rendering the columns and fields. This should make
it easy to implement ...</p>
Freely redistributable