Re: newforms feedback?

2007-01-13 Thread Honza Král
On 1/13/07, mfremont <[EMAIL PROTECTED]> wrote: I've been working on my first non-trivial Django app using newforms and, in general, I found it much easier to work with than the forms/manipulators from 0.95. Is this the right place to offer detailed feedback? definitely I have some specific

newforms feedback?

2007-01-13 Thread mfremont
I've been working on my first non-trivial Django app using newforms and, in general, I found it much easier to work with than the forms/manipulators from 0.95. Is this the right place to offer detailed feedback? I have some specific comments about the API, which include some suggestions for impro

Re: newforms: feedback

2006-12-27 Thread Adrian Holovaty
On 12/26/06, Honza Král <[EMAIL PROTECTED]> wrote: there could be an initial_value parameter for Fields... I have implemented it as part of the default parameter, I am still waiting for any feedback, one of the solutions to that problem (see the post in this group [0]) would be to split the beha

Re: newforms: feedback

2006-12-26 Thread SmileyChris
On Dec 27, 1:43 pm, limodou <[EMAIL PROTECTED]> wrote: I'd like a dict to hold the default values, so we can get then from a instance or somewhere easily, but not set each field a default value. for example, the new forms __init__.py can has a defaultvalues parameter is a dict. When it will be r

Re: newforms: feedback

2006-12-26 Thread limodou
there could be an initial_value parameter for Fields... I have implemented it as part of the default parameter, I am still waiting for any feedback, one of the solutions to that problem (see the post in this group [0]) would be to split the behaviour between initial_value -- something to display

Re: newforms: feedback

2006-12-26 Thread Honza Král
On 12/27/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: On 12/26/06, Honza Kr l <[EMAIL PROTECTED]> wrote: > I have > implemented it as part of the default parameter, I am still waiting > for any feedback Giving feedback for that is on my to-do list as I read through several hundred Google Grou

Re: newforms: feedback

2006-12-26 Thread Adrian Holovaty
On 12/26/06, Honza Král <[EMAIL PROTECTED]> wrote: I have implemented it as part of the default parameter, I am still waiting for any feedback Giving feedback for that is on my to-do list as I read through several hundred Google Groups messages...Thanks for your patience so far! Adrian -- Ad

Re: newforms feedback

2006-12-26 Thread Adrian Holovaty
On 12/19/06, Alan Green <[EMAIL PROTECTED]> wrote: 1. It would be nice if EmailField and URLField had max_length attributes. OK, I've added this in changeset [4241]. 2. When I tried to specify an empty label, with label='', I get the automatically generated label. Ah, I didn't anticipate p

Re: newforms: feedback

2006-12-26 Thread Honza Král
On 12/27/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: On 12/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > 2. Sometimes its very important for me to show some initial values in > form, on 'Add' screen. Typical > example, is a form, where customer can specify a different First,Last > Nam

Re: newforms: feedback

2006-12-26 Thread Adrian Holovaty
On 12/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: 2. Sometimes its very important for me to show some initial values in form, on 'Add' screen. Typical example, is a form, where customer can specify a different First,Last Name and Email address. If I pass data=xxx to form constructor, it

Re: newforms feedback

2006-12-26 Thread RonnyPfannschmidt
Hi, i just took a look at newforms, and the Lack of Function/Method based Validators makes my work harder. I'd like to see an Interface where i could define any Number of Form-methods beginning with "clean_fieldname_" to define multiple custom Validators for some Fields, as well as more than one

newforms: feedback

2006-12-25 Thread [EMAIL PROTECTED]
Hi! I have reimplemented my project to use django.newforms. At all, I conclude that newforms saved some of my time and its a good tool already. But since its a alpha only I had a few troubles and few things which I think are good to change. 1. At first, I already mailed this mailing list about

newforms feedback

2006-12-19 Thread Alan Green
Hi Adrian, I've been using newforms to implement a short form. Generally, it's been a smooth ride, and I appreciate the flexibility and simplicity of rendering compared to the old way. Between the doco, the examples in the test case and the code, using it was straightforward too. I have just thr

Re: newforms feedback

2006-12-16 Thread Gary Doades
Adrian Holovaty wrote: >> but you *can* do that now, the only difference between what is now and >> what you are proposing is that you call validators, what are now >> Fields and you would call it >> CharField( validators=[USState, IsAllUpperCase] ) >> where you can now write >> ComboField( CharFi

Re: newforms feedback

2006-12-16 Thread Adrian Holovaty
On 12/15/06, Honza Král <[EMAIL PROTECTED]> wrote: > > Why not just have a CharField and a USState validator and an IPaddress4 > > validator. That way you have a USState validator to apply to other > > fields as well. > > but you *can* do that now, the only difference between what is now and > wha

Re: newforms feedback

2006-12-15 Thread Honza Král
On 12/16/06, Gary Doades <[EMAIL PROTECTED]> wrote: > > Adrian Holovaty wrote: > > Ah, but we *will* have USStateField and USStateField field -- I just > > haven't written those Field classes yet. :) > > > > Why not just have a CharField and a USState validator and an IPaddress4 > validator. That w

Re: newforms feedback

2006-12-15 Thread Gary Doades
Adrian Holovaty wrote: > Ah, but we *will* have USStateField and USStateField field -- I just > haven't written those Field classes yet. :) > Why not just have a CharField and a USState validator and an IPaddress4 validator. That way you have a USState validator to apply to other fields as wel

Re: newforms feedback

2006-12-15 Thread Gary Doades
Adrian Holovaty wrote: > If the argument is "It violates DRY to have to create a Field subclass > just to handle an existing validator," I'm not sure that argument > flies, because we will eventually have a Field for every validator. > Ideally, validators wouldn't even *exist* anymore, as Fields c

Re: Re: newforms feedback

2006-12-15 Thread Adrian Holovaty
On 12/10/06, Benjamin Slavin <[EMAIL PROTECTED]> wrote: > 1) I think that ComboField is a great idea, but I don't think it > handles all use cases gracefully. There's a rich collection of > validators that have been created that would not be easily accessible > if we have to use ComboField or cre

Re: newforms feedback

2006-12-10 Thread Gary Wilson
Gary Wilson wrote: > I am also a fan of validator_list. As someone mentioned earlier, it is > sometimes preferable to have two levels of data validation, at the form > level and the model level. I have several cases where I have multiple > forms that save to the same model in some way but use di

Re: newforms feedback

2006-12-08 Thread Gary Wilson
Adrian Holovaty wrote: > On 12/8/06, Gary Doades <[EMAIL PROTECTED]> wrote: > > Also, how can I pass a validator_list to get similar functionality to > > manipulators? Having the ability to supply a validator_list containing > > a list of small single purpose validators is quite nice. Have I misse

Re: newforms feedback

2006-12-08 Thread Gary Doades
Adrian Holovaty wrote: > Hey Gary, > > Great suggestion! Based on your idea, I've just checked in an extra > hook, Field.widget_attrs(), which lets a Field specify any HTML > attributes to add to its Widget. I've implemented the maxlength > attribute for CharField, so your example can be rewritt

Re: newforms feedback

2006-12-08 Thread Gary Doades
Honza Král wrote: >> Also, how can I pass a validator_list to get similar functionality to >> manipulators? Having the ability to supply a validator_list containing >> a list of small single purpose validators is quite nice. Have I missed >> something? > > you can subclass the Field class and add

Re: newforms feedback

2006-12-08 Thread Adrian Holovaty
On 12/8/06, Gary Doades <[EMAIL PROTECTED]> wrote: > I'm just starting to contsruct a form or two with the newforms package. > It works very nicely. However I have a couple of points so far: > > It would be nice for the CharField field to output a "maxlength" > attribute if the max_length paramete

Re: newforms feedback

2006-12-08 Thread Honza Král
On 12/8/06, Gary Doades <[EMAIL PROTECTED]> wrote: > > I'm just starting to contsruct a form or two with the newforms package. > It works very nicely. However I have a couple of points so far: > > It would be nice for the CharField field to output a "maxlength" > attribute if the max_length paramet

newforms feedback

2006-12-08 Thread Gary Doades
I'm just starting to contsruct a form or two with the newforms package. It works very nicely. However I have a couple of points so far: It would be nice for the CharField field to output a "maxlength" attribute if the max_length parameter is set. Otherwise we have to do this: name = CharField(ma