My understanding about ChangeManipulator is it should be only used for
one model and it's ok with another model with edit-inline.

If you'd like to manipulate two model at the same time without
edit-inline, you can either subclass the Manipulator instead of
ChangeManipulator or use two ChangeManipulator.

If you have no special requirement for the edit-inline model, go ahead
use one ChangeManipulator. Below is a example:

model2 is edit-inline into model

In view:

# use one ChangeManipulator
m= model.ChangeManipulator()
# MUST DO, both edit-inline object and model object populated in
new_data
new_data=m.flatten_data()
form = forms.FormWrapper(m, new_data, errors)

In template, access the edit-inline formfield with:

{% for model2item in form.model2 %}
{{ model2item.field }}
...
{% endfor %}

Soon or later you'll find it's painful to dealwith the field size of
the edit-inline field. I made a template filter to resize the
formfield. Please take a look at code in the link below(forgive me,
it's a chinese blog entry):

http://blog.xiangcan.com/blog/me/2006/09/06/28.html


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