<table> <thead> <tr><th>column1</th><th>column2</th></tr> </thead> <tbody> <tr><td>form1.value1</td><td>form1.value2</td></tr> ... </tbody> </table>
Whereas the django formset.as_table() method displays as below, with the heading on the same row as the data:
<table> <tr><th>column1</th><td>form1.value1</td></tr> <tr><th>column2</th><td>form1.value2</td></tr> </table>
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:
Post a Comment