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 &
Section-04
    Each "Section" has number of attributes.

I want to show all books on its own line
If a book is clicked, I'll expand a hidden DIV, which will show the 4
sections of that book.
Like so -
Book-1 | Short Description of book (when clicked, shows the below
section)
Section-01 | Section-02 | Section-04 | Section-04 |
Book-2 | Short Description of book (when clicked, shows the below
section)
Section-01 | Section-02 | Section-04 |...
...
..
.

I have all the HTML code figured out, using jquery to show/hide Divs.

Question - I'm confused as to how I can pass all this data from the
view to the HTML page and then render so that when user edits
something, things are passed back, in the form of Forms.

But is there a way to pass this whole composite object - Author+Books
+AllSectionsInBook in one go.

Would be great if you could point me in a direction or how you solved
this composition problem.
Thanks a lot in advance !
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to