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.
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
2 matches
Mail list logo