Mon 3 Jul 2006
Django Tips: Forms With Multiple Inline Objects
Posted at 23:38 +1000 (edited 16 Sep 2006, 12:57)
The form creation and handling code in Django seems to strike a nice balance between "making the easy things easy and the hard things possible", as the saying goes. However, there are some areas of it that are not perfectly documented yet and sometimes you have to rummage through the source code for a few minutes to work how to achieve something that, in retrospect, is simple.
One example: how to create a form for editing multiple inline objects on a single page?
The admin interface manages this fairly nicely for relatively small numbers of objects. Surely it should be possible to do the same in our own, customised forms. It is indeed possible and not too difficult, either...