Login

Tag "columns"

Snippet List

Template filter that divides a list into exact columns

Template filter that divides a list into an exact number of columns. The number of columns is guaranteed. Example (list == [1,2,3,4,5,6,7,8,9,10]): {% for column in list|columns:3 %} <ul> {% for item in column %} <li>{{ item }}</li> {% endfor %} </ul> {% endfor %} Result: <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> <ul> <li>5</li> <li>6</li> <li>7</li> </ul> <ul> <li>8</li> <li>9</li> <li>10</li> </ul> By Davide Muzzarelli

  • filter
  • template-filter
  • list
  • columns
Read More

CheckboxSelectMultiple that renders in columns

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. See also: http://code.djangoproject.com/ticket/9230

  • checkbox
  • columns
Read More

WTForm (What The Form)

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 WTForm was built with the well-documented [YUI Grid CSS](http://developer.yahoo.com/yui/grids/) in mind when rendering the columns and fields. This should make it easy to implement WTForm in your own applications. Here is an image of an [example form rendered with WTForm](http://www.gmta.info/files/wtform.png).

  • newforms
  • html
  • css
  • fieldset
  • form
  • yui
  • rendering
  • grid
  • columns
  • layout
Read More
Author: chrj
  • 23
  • 101

4 snippets posted so far.