On 8/23/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> How To Be Sexy, Rule 1: The word "manipulator" has really got to go.
>
Thinger = "Manipulator" or "Form" # The thing that holds the fields
Bah, I try and try, but I can't figure out how to seperate the
manipulation process from the Thing
Jacob Kaplan-Moss wrote:
> On Aug 25, 2006, at 7:04 AM, DavidA wrote:
> > One comment on ValidationErrors: When I've done these types of things
> > in the past, I've typically returned two levels of validations
> > messages: warnings and errors. An error indicates that the attempted
> > save will
Personally, I like the form exception thing, but if enough people
think it's un-Pythonic or too expensive to use an exception for it,
then I can get behind that.
I like a lot of the stuff in Joseph's proposal, especially the method
of handling read-only fields (that would solve a lot of common
pr
On 8/25/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
> > The whole raising a Form thing is just a shocking idea.
>
> Which, right there, is what I'm opposed to it. Often there's a reason
> why things are usually done one way, and I don't want to break from
> the standard way of using exception
On Aug 24, 2006, at 2:21 PM, Brantley Harris wrote:
> > The whole raising a Form thing is just a shocking idea.
+1
At first, I really digged this raising a Form, but then I realized
that it is just returning a value, but too cleverly...
1. It feels like a goto is happening (execution jumping in
[Pulling together quotes from a few messages]
On Aug 24, 2006, at 2:21 PM, Brantley Harris wrote:
> My problem with Joseph's proposal is that I believe it to be too tied
> to the concept of the Model. Idealy, the Form/Manipulator should not
> really have anything to do with a Model, except perha
One comment on ValidationErrors: When I've done these types of things
in the past, I've typically returned two levels of validations
messages: warnings and errors. An error indicates that the attempted
save will fail (i.e. it would either cause a an object to be saved in
an invalid state or it wou
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
James Bennett wrote:
> On 8/23/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>> Thoughts/comments/suggestions on Joseph's plan below, and on Brant's
>> plan in Trac?
>
> I think Brant's rocking the sexiness; the concept of validation
> behaving as a try/except block feels nice to me. And bidding
On 8/24/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
>
> Al-rightly then... thoughts?
>
+1 ValidationErrors with an s, as I've said before: the more errors
returned at once, the better.
My problem with Joseph's proposal is that I believe it to be too tied
to the concept of the Model. Idealy
JP wrote:
> Also, exceptions are very
> expensive,
while this is true in java or c++, it is not necessarily true in python.
even python itself uses exceptions for example when doing a for-loop
over an iterable (the iterator's next() method raises StopIteration when
it's at the end).
gabor
--~
On Aug 23, 2006, at 6:25 PM, Adrian Holovaty wrote:
> Let's make this happen!
Indeed!
I've got some thoughts and preferences given all the ideas I've seen,
so here goes... Essentially, I think there's two tasks here:
1. Validation-aware models.
I very much want to be able to validate and sa
James Bennett wrote:
> On 8/24/06, JP <[EMAIL PROTECTED]> wrote:
> > I like James Bennetts's example a lot, but I'd like it more if the form
> > class were ModelForm, descending from a more general Form class that
> > would look much like the base Manipulator class of today.
>
> I think you're con
James Bennett wrote:
> I'm not so sure about that. The form itself was the thing that was
> "bad" and needs to be dealt with, so why *shouldn't* it be the
> exception?
It just feels right to me... When you're opening a file and you, say,
don't have permission you get OSError, not this "bad" file
On 8/24/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
>
> Brantley Harris wrote:
> > Maybe it's a philosophic question, but I see it best
> > defined in the "model" space because then it provides a modular
> > process for views to leverage.
>
> Manipulators can (and do) serve not only as model save
On 8/24/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
> I think the piece on which I agree with JP is that a _form_ serving as
> an exception is counter-intuitive. I would prefer an exception to be an
> error dict that is then used to display them.
I'm not so sure about that. The form itself was t
On 8/24/06, JP <[EMAIL PROTECTED]> wrote:
> I like James Bennetts's example a lot, but I'd like it more if the form
> class were ModelForm, descending from a more general Form class that
> would look much like the base Manipulator class of today.
I think you're confusing me with someone else...
Dan Watson wrote:
> Actually that was one of my favorite pieces. I think it captures what's
> going on in a very intuitive way: try to create/update, if that fails,
> redisplay with errors.
I think the piece on which I agree with JP is that a _form_ serving as
an exception is counter-intuitive.
> I'm afraid that I find the idea in Brantley Harris's proposal of
> raising a Form as an exception as a form of flow control really
> counter-intuitive. Apologies and it's just my opinion of course, but it
> has a sort of "too clever" feel to me. Also, exceptions are very
> expensive, and I don'
I agree and disgree. :)
I like James Bennetts's example a lot, but I'd like it more if the form
class were ModelForm, descending from a more general Form class that
would look much like the base Manipulator class of today.
I'm afraid that I find the idea in Brantley Harris's proposal of
raising
Brantley Harris wrote:
> Maybe it's a philosophic question, but I see it best
> defined in the "model" space because then it provides a modular
> process for views to leverage.
Manipulators can (and do) serve not only as model savers. They can
authorize, register, send mail etc. Manipulator is j
On 8/24/06, Brantley Harris <[EMAIL PROTECTED]> wrote:
> No, watch for the difference between a ValidationError being raised
> and a Form exception being raised. In the ValidationError case, it
> must be saved and returned with the other validation errors in the
> given step (1. conversion; 2. fo
On 8/24/06, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 8/23/06, Brantley Harris <[EMAIL PROTECTED]> wrote:
> > The problem is that to make it usefull to the user (read: api-user /
> > developer), you have to put the model save in a try / except block so
> > that if there is a validation error
On 8/23/06, Brantley Harris <[EMAIL PROTECTED]> wrote:
> The problem is that to make it usefull to the user (read: api-user /
> developer), you have to put the model save in a try / except block so
> that if there is a validation error, it can raise the form.
> Otherwise, the user will have to pro
On 8/23/06, James Bennett <[EMAIL PROTECTED]> wrote:
> 1. I'm not sure I like the idea of manipulators having a 'process'
> method which does everything; it would feel more natural to just try
> 'manipulator.save()', have that save if all is well, and catch any
> validation errors.
The problem is
Finally! I've been waiting :)
On 8/23/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> How To Be Sexy, Rule 1: The word "manipulator" has really got to go.
>
> Thoughts/comments/suggestions on Joseph's plan below, and on Brant's
> plan in Trac?
>
I know you want to get rid of the concept of "
On 8/23/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> Thoughts/comments/suggestions on Joseph's plan below, and on Brant's
> plan in Trac?
I think Brant's rocking the sexiness; the concept of validation
behaving as a try/except block feels nice to me. And bidding good-bye
to 'if errors', FormW
Resurrecting an old thread...
Let's make this happen!
Joseph (in the e-mail below) has spelled out a pretty decent plan for
the new manipulator scheme. I see that we've got another proposal in
Trac by Brant Harris -- http://code.djangoproject.com/ticket/2586.
Let's get something decided and impl
On 3/8/06, Christopher Lenz <[EMAIL PROTECTED]> wrote:
>
> Am 08.03.2006 um 16:20 schrieb Joseph Kocherhans:
>
> So how is a Form connected to a Model?
This is the coolest part I think. Unfortunately I buried it with a
bunch of other stuff. The AddForm and ChangeForm would be created
automaticall
Am 08.03.2006 um 16:20 schrieb Joseph Kocherhans:
> The short version of this is really, forms and manipulators merge and
> get more powerful, models grow validation. This is an attempt to
> clarify and add to Adrian's previous proposal. I hope it takes care of
> people's concerns. Here are some d
The short version of this is really, forms and manipulators merge and
get more powerful, models grow validation. This is an attempt to
clarify and add to Adrian's previous proposal. I hope it takes care of
people's concerns. Here are some details:
Forms and FormFields are intended to be used for
31 matches
Mail list logo