Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

CookBookNewFormsFieldOrdering. Handy tip—change the order of fields in a Django newforms instance by over-riding form.fields.keyOrder (since fields is a SortedDict).

Tagged , , ,

3 comments

  1. Very, very useful that.

    David Reynolds - 27th June 2008 09:16 - #

  2. Uncanny. I started playing with the Django forms stuff (so cool!) only a couple of days ago, and needed this almost instantly. Thanks.

    Tom Insam - 27th June 2008 09:19 - #

  3. Great, i wish i had seen that one a bit earlier. Is there also a way to define the grouping of the fields?

    eelco - 27th June 2008 18:55 - #

Sign in with OpenID

Auto-HTML: Line breaks are preserved; URLs will be converted in to links.

Manual XHTML: Enter your own, valid XHTML. Allowed tags are a, p, blockquote, ul, ol, li, dl, dt, dd, em, strong, dfn, code, q, samp, kbd, var, cite, abbr, acronym, sub, sup, br, pre

A django site