Re: [Repoze-dev] Deform/Colander: allow empty non-String field in schema?

2010-06-09 Thread Chris McDonough
On Tue, 2010-06-08 at 00:55 -0400, Chris McDonough wrote: > It would be useful if the folks for whom it mattered could give this new > regime a roll before I merge it to the respective colander and deform > trunks and make new releases of both. > > http://svn.repoze.org/deform/branches/default_ov

Re: [Repoze-dev] Deform/Colander: allow empty non-String field in schema?

2010-06-07 Thread Chris McDonough
On Fri, 2010-05-28 at 08:28 -0400, Chris McDonough wrote: > I agree with how Tim just characterized this. I'm still trying to > figure out what the best way to spell it. > > My current idea is to: > > - Define a special "null" sentinel value. > > - Change the type definitions and widget definit

Re: [Repoze-dev] Deform/Colander: allow empty non-String field in schema?

2010-05-28 Thread Tim Hoffman
Hi Chris Your description here is exactly what I would expect. > > However, that leaves this corner case, which I'm having a difficult time > trying to reconcile: > >  n = SchemaNode(Integer(), default=1, required=True) > > I *think* this means that the "first rendering of the form will display >

Re: [Repoze-dev] Deform/Colander: allow empty non-String field in schema?

2010-05-28 Thread Chris McDonough
On Fri, 2010-05-28 at 07:25 +0800, Tim Hoffman wrote: > >From the point of view of the form definition, I think you need to be > able to define some type > of sentinal value that indicates a field is empty, but valid if it is > not required. > > I think it would be a mistake to assume that default

Re: [Repoze-dev] Deform/Colander: allow empty non-String field in schema?

2010-05-27 Thread Malthe Borch
FWIW, in repoze.formapi, I originally had the same constraint – no required fields – but we later introduced it because of these reasons exactly. See http://pypi.python.org/pypi/repoze.formapi/0.5.0 ("required fields") \malthe On 28 May 2010 02:25, Tim Hoffman wrote: > Hi > > I do think you are

Re: [Repoze-dev] Deform/Colander: allow empty non-String field in schema?

2010-05-27 Thread Tim Hoffman
Hi I do think you are conflating form processing with db schema and the backend. Decoupling the form processing from any form of backend is a pretty important idea in my opinion. >From the point of view of the form definition, I think you need to be able to define some type of sentinal value tha

Re: [Repoze-dev] Deform/Colander: allow empty non-String field in schema?

2010-05-27 Thread Chris Shenton
On May 27, 2010, at 3:24 AM, Chris McDonough wrote: > > This is an area that I'm not 100% confident about yet, so I'm glad > you're stressing it a bit. > > FTR, this definitely won't work: > > SchemaNode(Integer(), required=False, allow_empty=True) > > Because a SchemaNode does nothing with

Re: [Repoze-dev] Deform/Colander: allow empty non-String field in schema?

2010-05-27 Thread Chris McDonough
> We're doing a BFG app with a MongdoDB backend, and the Deform stuff seems > perfect for us, really enjoying using it so far. > > But I can't figure out how to make a field in a schema optional if it's > not a String. (I've done this in Django model schemas where I can use the > flag "null=True"

[Repoze-dev] Deform/Colander: allow empty non-String field in schema?

2010-05-26 Thread Chris Shenton
We're doing a BFG app with a MongdoDB backend, and the Deform stuff seems perfect for us, really enjoying using it so far. But I can't figure out how to make a field in a schema optional if it's not a String. (I've done this in Django model schemas where I can use the flag "null=True" and bla