Re: question about modelform lifecycle

2009-12-09 Thread chefsmart
Brilliant! Thanks. Just to make it clear for anyone else reading, doing self.instance.pk gives me what I want. I am not really an expert at any level, have no formal training, and am just poking around the "dark alley of code" to find my way, so am just hoping what I am doing is right ;) Regards

Re: question about modelform lifecycle

2009-12-09 Thread bruno desthuilliers
On 9 déc, 06:29, chefsmart wrote: > At what point in a modelform's lifecycle does the underlying object > become accessible? > Specifically, can I access the underlying object in > a modelform's "clean" method? >  Or is it only after one does form.save > () with or without commit = False? Use the

question about modelform lifecycle

2009-12-08 Thread chefsmart
At what point in a modelform's lifecycle does the underlying object become accessible? Specifically, can I access the underlying object in a modelform's "clean" method? Or is it only after one does form.save () with or without commit = False? I basically need to do some custom validation and need