On 2007-08-29 10:45:07 -0600, Brian Rosner 
<[EMAIL PROTECTED]> said:

> 
> I am using the FormSet class found in newforms-admin for a site since
> it needed functionality that it offers.  The form that my users use
> lets them upload up to five files and an associated description.  I
> have this defined in its own model and use the following code to get it
> setup:
> 
> FlightFileForm = form_for_model(FlightFile, fields=('file',
>     'description'), formfield_callback=flightlink_formfield_callback)
> FlightFileFormSet = formset_for_form(FlightFileForm, num_extra=5)
> 
> When it came time for me to commit this data to the database and save
> the file to disk I really had no reference to what forms to call save()
> on.  The BaseFormSet class gives me access to the cleaned data of each
> form, but not the actual form.  So now I am having to implement logic
> to do this myself.  While this isn't a big deal it would be nice if
> FormSets gave me cleaned_forms that I can iterate over and do what I
> need with each form that was used.
> 
> Any feedback?

Actually this is better solved using the FormSet support in 
django.newforms.models.  My bad.

-- 
Brian Rosner
http://www.brosner.com/blog



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to