Re: boolean default

2011-05-17 Thread Karen Tracey
On Tue, May 17, 2011 at 5:45 PM, Greg Donald wrote: > On Tue, May 17, 2011 at 3:20 PM, Lucian Nicolescu > wrote: > > AFAIK Django does not create SQL instructions for default values. But > > if you specify a default value inside the model field declaration

Re: boolean default

2011-05-17 Thread Greg Donald
On Tue, May 17, 2011 at 3:20 PM, Lucian Nicolescu wrote: > AFAIK Django does not create SQL instructions for default values. But > if you specify a default value inside the model field declaration and > use the orm for inserts it will correctly assign it. That's the behavior

Re: boolean default

2011-05-17 Thread Lucian Nicolescu
AFAIK Django does not create SQL instructions for default values. But if you specify a default value inside the model field declaration and use the orm for inserts it will correctly assign it. Lucian On Tue, May 17, 2011 at 7:49 PM, Greg Donald wrote: > On Tue, May 17, 2011

Re: boolean default

2011-05-17 Thread Greg Donald
On Tue, May 17, 2011 at 8:53 AM, Derek wrote: > This is a very subtle point.  The docs for "default": > http://docs.djangoproject.com/en/1.3/ref/models/fields/#default > do not explicitly say anything about creating any SQL-related code; > therefore perhaps best to assume

Re: boolean default

2011-05-17 Thread Derek
On May 15, 8:53 pm, Christophe Pettus wrote: > On May 15, 2011, at 2:15 PM, Greg Donald wrote: > > > How do I set a default for a BooleanField() ? > > > I tried > > > foo = models.BooleanField( default=False ) > > > but that only produces > > > foo boolean NOT NULL, > > The

Re: boolean default

2011-05-15 Thread Christophe Pettus
On May 15, 2011, at 2:15 PM, Greg Donald wrote: > How do I set a default for a BooleanField() ? > > I tried > > foo = models.BooleanField( default=False ) > > > but that only produces > > foo boolean NOT NULL, The default= parameter in Django doesn't generate a DEFAULT in the SQL; the

boolean default

2011-05-15 Thread Greg Donald
How do I set a default for a BooleanField() ? I tried foo = models.BooleanField( default=False ) but that only produces foo boolean NOT NULL, Docs do not mention how as far as I can tell http://docs.djangoproject.com/en/1.3/ref/models/fields/#booleanfield -- Greg Donald destiney.com |