Re: Passing parent with multiple childs from View to HTML

2009-09-27 Thread Jay
In Django template, you can make methed call. So you can pass the auther object to the template, then {% for book in auther.books.all %} {% for section in book.sections.all %} {% end for %} {% endfor %} The ordering is using the definition in the Model Meta class.

Passing parent with multiple childs from View to HTML

2009-09-26 Thread PlanetUnknown
I have been studying the modalforms & inline formsets but am not able to wrap my head around my composite objects, and want to see how things are done in django world - I have this hierarchical model "Author" has many "Books" Each "Book" has 4 Sections -> Section-01, Section-02, Section-03 & Se