Re: confused about ModelForm Field validation

2011-02-18 Thread Roman Klesel
2011/2/18 Roman Klesel : >> I would use pre_save signal for data modification did not really work. In any case I need to use to_python so that the ModelForm displays the right value, and then I'm in *BEEP*, since to_python not only receives the values from the db but also get's passed the return

Re: confused about ModelForm Field validation

2011-02-18 Thread Roman Klesel
Hello Piotr, 2011/2/18 Piotr Zalewa : > > I would use pre_save signal for data modification > hmm ... this sounds like a good idea. It would make the whole thing a lot more compact ... I'll give it a try. Thank's! Roman -- You received this message because you are subscribed to the Google Gro

Re: confused about ModelForm Field validation

2011-02-18 Thread Piotr Zalewa
On 02/18/11 09:44, Roman Klesel wrote: > [..] in some cases the values > stored in the tables have to be converted before the can be displayed > and also have to be converted bevore bein saved to the database. > [...] > def clean(self,value): > "convert the literal value to the db rep

confused about ModelForm Field validation

2011-02-18 Thread Roman Klesel
Hello guys, I'm running django on a legacy database and in some cases the values stored in the tables have to be converted before the can be displayed and also have to be converted bevore bein saved to the database. Example: A table for storing IP addresses: The address field contains values th