Re: BooleanField and MySQL default value

2006-04-26 Thread Viktor
OK, I found the problem... The problem is that manipulators don't look for the default value of the field if the field isn't set as editable=False, which is bad because I may (I have) objects that can be created by different users, and not all users can set all attributes. When some group of u

Re: BooleanField and MySQL default value

2006-04-23 Thread Viktor
Adrian Holovaty wrote: > Default values aren't created at the SQL level -- they're enforced at > the Django DB-API level. OK, I figured that out the meantime, but it doesn't work for the BooleanField. When I define the default value for my BooleanField to True and then create an object this fi

Re: BooleanField and MySQL default value

2006-04-23 Thread Glenn Tenney
On Sun, Apr 23, 2006 at 03:14:15PM -0500, Adrian Holovaty wrote: > Default values aren't created at the SQL level -- they're enforced at > the Django DB-API level. I thought that was only enforced by the admin functionality and that if I wanted a default value for my views I'd have to write it my

Re: BooleanField and MySQL default value

2006-04-23 Thread Adrian Holovaty
On 4/22/06, Viktor <[EMAIL PROTECTED]> wrote: > When I define a model: > > >>> class Test(models.Model): > >>> ... some other fields ... > >>>bool_field = models.BooleanField(default=True) > > Django generate next sql: > > CREATE TABLE `test_test` ( > `id` integer AUTO_INCREMENT NO