Tuesday, May 17, 2011

Re: boolean default

On Tue, May 17, 2011 at 8:53 AM, Derek <gamesbook@gmail.com> 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 that Django does not.  In effect (and
> this is a very crude way of putting it), a Django model is a
> "superset" of a SQL table.

If you say so.

In practice the BooleanField() is forcing me to provide a value when
I'd rather just have this particular field default to false and not
provide a value at all when I created a new record.

--
Greg Donald
destiney.com | gregdonald.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate