On 3/17/06, PythonistL <[EMAIL PROTECTED]> wrote:
>
> Limodou,
> I have the custom manipulator, see the beginning of this thread.
> But I do not know how to populate data from that manipulator to the form
>

the data passed to FormWrapper should match the name of FormField's
field_name. I checked your code and found that you create many input
fields for every item, for example:

items = ['A', 'B', 'C']

so the field_names of FormFields will be:

'A', 'A_Name', 'A_Description'...
'B', 'B_Name', 'B_Desctiption'...
'C', 'C_Name', 'C_Description'...

And if you want to pass data to FormWrapper, the data should be a
dict, and the field you want to set value should exists in it. So the
data maybe looks like:

data = ['A':'A', 'A_Name':'A_Name', ..., 'A_Price':a_price,
'B':...
'C'...
]

And if you want to create such dict, you should loop the items just
like you create manipulator's fields.

I don't know whether I describe clearly and I havenot tried how to
deal with some fields with the same field_name in a manipulator. Just
try it.

--
I like python!
My Blog: http://www.donews.net/limodou
NewEdit Maillist: http://groups.google.com/group/NewEdit

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to