On 4/19/06, PythonistL <[EMAIL PROTECTED]> wrote:
> As to CHANGE manipulator, I do not know how to fill in (prepopulate)the
> form with the data, being changed, from the database. Any idea?

If you want to pre-populate the form data, you just need to be able to
set new_data to hold the data from the object being changed, for when
you create a FormWrapper.

The documentation examples just do this by setting
new_data=original.__dict__, to put all of the object's fields into
new_data.

The general flow for the view is just:

manipulator = CustomChangeManipulator(object_key)
original = manipulator.original
if request.POST:
    # code here exactly like for AddManipulator
else:
    errors = {}
    new_data = original.__dict__
# generate and present form just like AddManipulator


Regards,
Ian Clelland
<[EMAIL PROTECTED]>

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