Re: django 1.2 ModelForm save during post_clean has caused me quite a headache ...

2010-07-13 Thread Margie
I think that what that http://docs.djangoproject.com/en/dev/releases/1.2/#modelform-is-valid... is saying is that if you don't want your instance to get modified by is_valid(), then when you initially create your ModelForm, you should pass in a copy of your instance. Something like this: instan

Re: django 1.2 ModelForm save during post_clean has caused me quite a headache ...

2010-07-13 Thread Alaa Abd El Fattah
On Tue, 13 Jul 2010 02:10:03 -0700 (PDT) Margie wrote: > It's hard for me to believe that no other developers have encountered > this same problem (the problem of having a ModelForm saved at a point > in the code where you have no control). I did face the same problem in a more straightforward a

Re: django 1.2 ModelForm save during post_clean has caused me quite a headache ...

2010-07-13 Thread Margie
You are right, I should have tried out the trunk much earlier. And I agree that Python is a language for consenting adults (ad pretty much everything you said) so I won't hash it out. I went outside the interface, and now I have to deal with it. I think this came about because I really never com

Re: django 1.2 ModelForm save during post_clean has caused me quite a headache ...

2010-07-13 Thread Margie
Let's take the admin changelist as an example again. I have a changelist just like this. Let me give a sequence of steps: 1. User1 and User2 both have the changelist displayed on their screen, and both are displaying objects A and B. Let's say the objects have a 'name' field, and objectA's nam

Re: django 1.2 ModelForm save during post_clean has caused me quite a headache ...

2010-07-13 Thread Russell Keith-Magee
On Tue, Jul 13, 2010 at 5:10 PM, Margie wrote: > Hi developers, > > I would suggest considering making this new model validation code path > optional.  IE, give users a way to stay with the old form validation. > Or better yet, keep the idea of model validation, but make it more > transparent by n

Re: django 1.2 ModelForm save during post_clean has caused me quite a headache ...

2010-07-13 Thread SmileyChris
On Jul 13, 9:10 pm, Margie wrote: > Yes, I know from tickets I have posted that modifying exclude > dynamically is "not allowed". Why wouldn't you just modify self.fields? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this gr

django 1.2 ModelForm save during post_clean has caused me quite a headache ...

2010-07-13 Thread Margie
Hi developers, Having just ported to 1.2.1, I'd like to make a comment about a change that was made to the code from 1.1. I understand that you wanted to add a more generic form of model validation into the code base. But I'd just like to let folks know that changing the code such that the ModelF