On 8/24/06, Bill de hÓra <[EMAIL PROTECTED]> wrote:
>
> I gather this proposal means validation will be highly optimised for web
> forms and available only on POST? I understand that is the mainline use
> case, but I have a preference something that wasn't baked into HTML 'cos
> I'll have to hack around it eventually or use something else.
>
Well according to my original proposal, there would be a Manipulator
and a GETManipulator, or a JSONManipulator.  It would be easy to make
as many as you'd like, just change that process function.

> 2: fast fail
>
> Throwing exceptions means the first error will exit the chain. A lot of
> work I do involves gathering as many errors as possible.
>
No, the Form is only thrown after each one of the three steps
(converting data, validating field data, validating model data), if
needed.  I agree, gather as many errors as possible.

> 3: exception based flow
>
> This will be my inner Java guy no doubt, but using exceptions to manage
> mainline execution seems wrong to me. I guess I see validation failure
> as not being exceptional behaviour. But as it goes, I think what's there
> is about as elegant as you make it  with exceptions. Partially related
> to 2 because when you walk away from exceptions as a mechanism you are
> left with a chaining/pipelining approach, which will support error
> collation naturally.
>
The whole raising a Form thing is just a shocking idea.  Like gabor
mentioned, it's actually done often in Python.  Exceptions are just a
different and handy control structure to me; I understand that it's a
weird idea, I just don't understand why.  Anyhow, ValidationErrors are
exceptions now anway, so this, in general, would actually be lessoning
the ammount of Exceptions being thrown.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to