Hi Rajeesh,

Thanks for the reply, but I still didn't manage to make it work. On the one
hand, I couldn't find the get_default_prefix function (I'm using Django
1.02, which may explain that), but on the other hand, I do provide a prefix
argument when I generate the formset, in my view:

image_formset = ImageFormset(request.POST,
                                                     request.FILES,
                                                     instance=exp,
                                                     prefix='image_form'
                                                     )

I do that both for POST and non-POST creation of formsets.

Also, I searched google for get_default_prefix and it seems that all it does
is return the string 'form' (or at least it did, I don't know how recent is
the documentation I found).

Thanks,
Paulo

On Thu, Mar 18, 2010 at 5:18 PM, raj <[email protected]> wrote:

>
> > This works, but if I leave out the prefix in the last command then the
> same
> > ValidationError is raised.
>
> You've almost worked it out yourself. This error usually occurs when
> the given prefix does not match with what django expected. When you
> don't provide any prefix argument on generating formset, django
> expects the default prefix. Try ImageFormset.get_default_prefix() to
> get that value and use it in your data dictionary
>
>
>
> Rajeesh.
>
> --
> 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]<django-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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