Thursday, April 8, 2010

Django formset.as_table() displays vertically only

Like other people, I want to be able to display a formset as an ordinary 'horizontal' table, i.e. where all headings are in their own row, separate from the data:

Whereas the django formset.as_table() method displays as below, with the heading on the same row as the data:

The solution is a pretty nasty gob of template code, since to fix it you need to make all the error handling and form magic explicit. Django devs: Let's have a new method or parameter to display the formset horizontal rather than vertical.

No comments: