On Tue, 2009-03-10 at 04:07 -0700, NoviceSortOf wrote: > Thanks Malcom, > > I re-read the links you sent along on forms and formsets. > > I'm now working with a form but instead of > ___________________________________________________________ > > > [ ] Stevenson Collected Works > > > [ ] Stevenson Treasure Island > > > [ ] Stevenson Wild West Stories > > > [Submit] > > I get a blank instance of the model reflected in the browser. rather > than a list of books...ie
Which means you haven't populated your form with any initial data (search for the term "initial" in the form documentation). > ___________________________________________________________ > Author : [ ] > Title : [ ] > Select : [ ] > [Submit] It also seems to me that this isn't what you were after initially. You were wanting a form that contained a single checkbox as the field, where the field label was a book title. Not a form for every field in the model so that the model could be edited. Take a few steps back from your code and remember the problem you were trying to solve. It sounded like you wanted a form with a single checkbox field. So why not start from there? > > I've tried working with formsets but > {% for field in forms %} > returns blanks > > and when I try changing it to > {% for field in formsets %} > i get an error message saying formset is not iterable > > What am I missing? Why are you trying to iterate over a formset instead of displaying it automatically (it's designed to encapsulate the behaviour of displaying forms individually)? There's nothing in the documentation that suggests doing that. I would first concentrate on getting a single form working that displays a single instance of the model. Once you understand how to display that and process the result, then moving onto multiple instances at once. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---