It looks like the change happened between rev. 10189 & 10190: 10189 displays the value, 10190 doesn't.
Unfortunately, I don't think I can give you a completely unbiased answer as to what behavior I think is more correct, because of history and personal use :) With that out on the table, though, it seems to me that if you are using a model form, and you're initializing it with a model instance, and that model instance has a current value for a field on your form, the form ought to get initialized with that value, regardless of whether or not you plan on eventually saving the field in the database or not. If you're going to display it, it ought to reflect what's currently in the database. I think I've read some stuff about eventually making 'read only' forms, or marking fields on a form as 'read only', which seems like it could tie into this somehow, eventually, maybe. If you agree with that, though, then currently both ModelForms & ModelFormsets initialization is broken, because neither fills in the values. - D On Aug 2, 6:24 am, Russell Keith-Magee <freakboy3...@gmail.com> wrote: > On Sun, Aug 2, 2009 at 12:58 PM, David Haas<david.h.h...@gmail.com> wrote: > > > Ramiro: > > > I've set up some models / forms / formsets which demonstrate the > > change here: > > >http://dpaste.de/YhrI/ > > > My initial report wasn't correct - the change in behavior is only seen > > when initalizing ModelFormSets . . . the ModelForm behavior is > > unchanged. With a formset, the value use to get initialized; now it > > doesn't. With a form, the value has never gotten initialized. > > > I think 1.1 & 1.0.3 have the same behavior (no initialization in > > formsets); and SVN 10132 (1.1 beta) & 1.0.2 have the same behavior > > (initialization in formsets). > > Hi David, > > Thanks for this report. I'll have to dig a bit deeper to see exactly > what is going on here. If you want to help out, working out which > changeset between 10132 (beta 1) and 11365 (1.1 final) introduced this > discrepancy would be extremely helpful. > > I'd also be interested to hear which behaviour - history and personal > uses notwithstanding - you think is correct. On first inspection, I'm > not completely convinced that the 'new' behaviour is actually > incorrect - or, at least, that there might be a larger bug lurking > here with regard to the interpretation of inherited Meta.field > arguments. However, this is entirely based on first impressions, late > at night, with a mild headache, so I could be completely off base. > > Yours > Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---