Hello,

I would say that the behavior you have is normal. Quoting the doc
<quote>
"Using initial data with a formset:
Initial data is what drives the main usability of a formset. As shown
above you can define the number of extra forms. What this means is
that you are telling the formset how many additional forms to show
**in addition** to the number of forms it generates from the initial
data."
</quote>

What I understood from the doc is that initial values are used for
existing objects or ones being built. Ie, if you provided 6 forms with
default values in a formset, you will end up with 6 new objects
created/modified. It's up to you then to really create/modfiy those
objects.

Consequently a solution for you would be to set extra=0 and set up you
inital datas as you have done.... but not create objects if default
values have not been changed (for instance).

Manu

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.


Reply via email to