Hi:

I'm hoping to get some feedback on a little change in behavior I'm
seeing when initializing ModelForms between 1.1-beta & the official
1.1 release.

The quick and dirty explanation is this: I have a ModelForm which is a
subclass of another ModelForm.  The parent ModelForm has the fields
attribute defined in its inner Meta class - the child ModelForm does
not.  In 1.1, when I pass in an instance of an object to initialize
the form, only the fields appearing in the parent ModelForm's field
attribute list end up with initial values - other fields are blank.
In 1.1-beta, all fields (whether or not they're in the parent
ModelForm's field list) get initial values.

In my case, I've worked around this new behavior by adding some code
in the child ModelForm __init__ method to set the initial values of
the relevant fields.  I'm just curious if the change in behavior was a
deliberate decision, and if not, does it merit a bug report?

And yes, I know that when you specify the fields attribute in an inner
Meta class, only those fields get saved to the db.  I have a system
with separate data entry & review, and I'm seeing this problem on the
review side.  During data review, no matter what gets sent out, the
only thing that I want to save in the database is "accept" or
"reject", which lives on the parent form.

Thanks in advance,

- D

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