Re: Ticket #15124: BooleanField should not use False as default (unless provided)

2011-02-03 Thread Karen Tracey
On Thu, Feb 3, 2011 at 4:55 PM, Richard Laager wrote: > On Thu, 2011-02-03 at 13:46 -0500, Tobias McNulty wrote: > > the behavior of all fields, except for BooleanField, is to default to > > the empty value supported by that field. > ... > > On the other hand, False is in no

Re: Ticket #15124: BooleanField should not use False as default (unless provided)

2011-02-03 Thread Richard Laager
On Thu, 2011-02-03 at 13:46 -0500, Tobias McNulty wrote: > the behavior of all fields, except for BooleanField, is to default to > the empty value supported by that field. ... > On the other hand, False is in no way an "empty value." From the point of view of the model layer, your point makes

Re: Ticket #15124: BooleanField should not use False as default (unless provided)

2011-02-03 Thread Tobias McNulty
On Thu, Feb 3, 2011 at 1:22 PM, anb wrote: > On Feb 2, 3:08 pm, Chris Beaven wrote: > > On Friday, January 21, 2011 12:35:58 PM UTC+13, Karen Tracey wrote: > > > > > Rather, a BooleanField that raises an error on an attempt to save an > > >

Re: Ticket #15124: BooleanField should not use False as default (unless provided)

2011-02-03 Thread Tobias McNulty
On Wed, Feb 2, 2011 at 6:08 PM, Chris Beaven wrote: > On Friday, January 21, 2011 12:35:58 PM UTC+13, Karen Tracey wrote: >> >> Rather, a BooleanField that raises an error on an attempt to save an >> instance that has no value set is what's being asked for. The quiet

Re: Ticket #15124: BooleanField should not use False as default (unless provided)

2011-02-03 Thread anb
On Feb 2, 3:08 pm, Chris Beaven wrote: > On Friday, January 21, 2011 12:35:58 PM UTC+13, Karen Tracey wrote: > > > Rather, a BooleanField that raises an error on an attempt to save an > > instance that has no value set is what's being asked for. The quiet always > >

Re: Ticket #15124: BooleanField should not use False as default (unless provided)

2011-02-02 Thread Chris Beaven
On Friday, January 21, 2011 12:35:58 PM UTC+13, Karen Tracey wrote: > > Rather, a BooleanField that raises an error on an attempt to save an > instance that has no value set is what's being asked for. The quiet always > defaulting to False does seem rather odd to me as well. > The current

Re: Ticket #15124: BooleanField should not use False as default (unless provided)

2011-01-26 Thread Russell Keith-Magee
On Fri, Jan 21, 2011 at 7:35 AM, Karen Tracey wrote: > On Thu, Jan 20, 2011 at 4:52 PM, Chris Beaven wrote: >> >> For good or bad, in Django a BooleanField is only ever supposed to be True >> or False. >> A default of False seems the logical equivalent

Re: Ticket #15124: BooleanField should not use False as default (unless provided)

2011-01-22 Thread Andrew Badr
> Does removing it cause any test failures? > > Karen Yes, one, on sqlite: Test: ERROR: test_issue_6755 (regressiontests.model_inheritance_regress.tests.ModelInheritanceTest) Exception: IntegrityError: model_inheritance_regress_restaurant.serves_hot_dogs may not be NULL This is the desired

Re: Ticket #15124: BooleanField should not use False as default (unless provided)

2011-01-20 Thread Karen Tracey
On Thu, Jan 20, 2011 at 4:52 PM, Chris Beaven wrote: > For good or bad, in Django a BooleanField is only ever supposed to be True > or False. > A default of False seems the logical equivalent to the default of '' on a > not-null CharField. > > If you want a nullable

Re: Ticket #15124: BooleanField should not use False as default (unless provided)

2011-01-20 Thread Chris Beaven
For good or bad, in Django a BooleanField is only ever supposed to be True or False. A default of False seems the logical equivalent to the default of '' on a not-null CharField. If you want a nullable boolean, you should use the separate NullBooleanField. -- You received this message

Re: Ticket #15124: BooleanField should not use False as default (unless provided)

2011-01-19 Thread Carl Meyer
This seems right to me. Does anyone with more history on BooleanField know of any reason why the "wontfix" resolution on #2855 was incorrect and the current default-to-False behavior is correct? Carl -- You received this message because you are subscribed to the Google Groups "Django

Ticket #15124: BooleanField should not use False as default (unless provided)

2011-01-19 Thread Andrew Badr
Models with a BooleanField are instantiated with that field's value set to False if no default or initial value is provided. Instead, like most other fields, the field's initial value should be set to None. This None should be left uncoerced when attempting to save the instance, so attempting to