Re: Newforms clean_data

2007-01-03 Thread Adrian Holovaty
On 1/3/07, Honza Král <[EMAIL PROTECTED]> wrote: I do agree that the magic would be bad - but the current state IS confusing, would it be possible to simply a) hide clean_data until validation has been done b) throw some exception when accessing uninitialized clean_data This is a good idea -

Re: Newforms clean_data

2007-01-03 Thread Honza Král
On 12/30/06, Waylan Limberg <[EMAIL PROTECTED]> wrote: On 12/29/06, Vadim Macagon <[EMAIL PROTECTED]> wrote: > > Adrian Holovaty wrote: > > > > Would it help if the form automatically called its validation the > > first time you accessed form.clean_data? I'm trying to decide whether > > that wou

Re: Newforms clean_data

2006-12-29 Thread Waylan Limberg
On 12/29/06, Vadim Macagon <[EMAIL PROTECTED]> wrote: Adrian Holovaty wrote: > > Would it help if the form automatically called its validation the > first time you accessed form.clean_data? I'm trying to decide whether > that would be convenient or too magic. > I kind of like the way it is now

Re: Newforms clean_data

2006-12-29 Thread Vadim Macagon
Adrian Holovaty wrote: Would it help if the form automatically called its validation the first time you accessed form.clean_data? I'm trying to decide whether that would be convenient or too magic. I kind of like the way it is now, if form.clean_data did the validation on first access how w

Re: Newforms clean_data

2006-12-29 Thread Adrian Holovaty
On 12/29/06, Waylan Limberg <[EMAIL PROTECTED]> wrote: I remember scratching my head over that too. form.clean_data is not available until after you call form.is_valid() and only if form.is_valid() returns true. Would it help if the form automatically called its validation the first time you a

Re: Newforms clean_data

2006-12-29 Thread Waylan Limberg
On 12/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I just recently started out working with newforms and they generally seem to be a joy but I cannot seem to access form.clean_data... (I am using the most recent dev. version) I remember scratching my head over that too. form.clean_data

Newforms clean_data

2006-12-29 Thread [EMAIL PROTECTED]
I just recently started out working with newforms and they generally seem to be a joy but I cannot seem to access form.clean_data... (I am using the most recent dev. version) if request.method == 'POST': new_data = request.POST.copy() personal_form = UserPersonalF