On Tue, May 01, 2007 at 11:58:44PM +0200, Honza Král wrote:
> >Boolean fields have the value ''. Should I initialize all the fields to
> >false either in code, or in the constructor? I would expect that Django
> >does this for me.
>
> if you want that you have to supply default value via default
save()
>
> I don't set boolean values here. save() results in the following
> ProgrammingError:
>
> ERROR: invalid input syntax for type boolean: "" INSERT INTO "info_object"
> (...) VALUES (..., '', '', ''...)
>
> Boole
Hello,
I have a class Object(models.Model) which contains model.BooleanFields.
I'm trying to add rows to it, like this:
o = Object()
o.a1 = 'a1'
o.a2 = 'a2'
o.save()
I don't set boolean values here. save() results in the following
ProgrammingError:
ERROR: invalid
3 matches
Mail list logo