[web2py] Re: boolean DAL field giving error under 2.5.1

2016-01-18 Thread lucas
so, if you add update=False to the field definition, shouldn't the unchecked checkbox put in a value of false in the db? because i am still getting errors upon updating. lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: boolean DAL field giving error under 2.5.1

2013-06-24 Thread Tim Richardson
On Sunday, 23 June 2013 10:27:22 UTC+10, Anthony wrote: > > On Saturday, June 22, 2013 4:55:02 PM UTC-4, lucas wrote: > >> it works fine, but only as long as "requires=IS_NOT_EMPTY()" is not also >> included in the options. > > > Yes, the IS_NOT_EMPTY validator doesn't really make sense with a

[web2py] Re: boolean DAL field giving error under 2.5.1

2013-06-23 Thread Anthony
To be clear, in this example, I used update=False because the field is boolean, but the "update" argument is not simply a boolean argument (i.e., it does not mean "update or don't update") -- it can take any value (or callable) appropriate for the type of field. Anthony On Sunday, June 23, 201

[web2py] Re: boolean DAL field giving error under 2.5.1

2013-06-23 Thread Anthony
> > It's hard to keep up with web2py new features. What is exactly, > update=False? True, but that's not a new feature (been there as long as I can remember). The "update" argument sets the value the field should take upon update if no value is specified (much like "default" works for insert

[web2py] Re: boolean DAL field giving error under 2.5.1

2013-06-23 Thread VP
It's hard to keep up with web2py new features. What is exactly, update=False? Thanks. On Saturday, June 22, 2013 3:33:28 PM UTC-5, Anthony wrote: > > Does this work: > > Field('report_motion', 'boolean', default=False, update=False), > > Anthony > > On Saturday, June 22, 2013 4:16:22 PM U

[web2py] Re: boolean DAL field giving error under 2.5.1

2013-06-22 Thread Anthony
On Saturday, June 22, 2013 4:55:02 PM UTC-4, lucas wrote: > it works fine, but only as long as "requires=IS_NOT_EMPTY()" is not also > included in the options. Yes, the IS_NOT_EMPTY validator doesn't really make sense with a checkbox, as there is no way to distinguish between "I'm deliberate

[web2py] Re: boolean DAL field giving error under 2.5.1

2013-06-22 Thread lucas
it works fine, but only as long as "requires=IS_NOT_EMPTY()" is not also included in the options. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py

[web2py] Re: boolean DAL field giving error under 2.5.1

2013-06-22 Thread Anthony
Does this work: Field('report_motion', 'boolean', default=False, update=False), Anthony On Saturday, June 22, 2013 4:16:22 PM UTC-4, lucas wrote: > > hello one and all, > > under db.py, i have the field definition: > > Field('report_motion', 'boolean', requires=IS_NOT_EMPTY(), > default