[web2py] Re: IS_NOT_IN_DB () Bypass the capital letters during validation

2011-03-07 Thread Bernd Rothert
Hi Yannick, On 6 Mrz., 20:07, Yannick ytchatch...@gmail.com wrote: Hello mate, A value is saved in the DB as lower case and we put this validation IS_NOT_IN_DB(). If for that field the user enter a Capital letter of the same value saved the application will validate the entry. This is not

[web2py] Re: Google Chrome 9 crashes

2011-02-08 Thread Bernd Rothert
Thank you, Paul! That's good news - the new builder tool surely is a good option to speed up page loading. Meanwhile I'm using google-chrome --disable-webgl to turn off WebGL until it has been fixed. Cheers Bernd On 8 Feb., 08:16, Paul Irish paul.ir...@gmail.com wrote: Sorry for the error,

[web2py] Google Chrome 9 crashes

2011-02-07 Thread Bernd Rothert
Today all of a sudden Google Chrome (9.0.597.84-r72991) hung loading a simple web2py page. It couldn't even render the welcome page any more. Even a blank new profile didn't work. It just hung and reported a crashed web page after a while (the sad dialog). Then I tried chromium - same behaviour,

[web2py] Re: Google Chrome 9 crashes

2011-02-07 Thread Bernd Rothert
hardware's support for GL... Bernd Massimo On Feb 7, 2:40 pm, Bernd Rothert roth...@googlemail.com wrote: Today all of a sudden Google Chrome (9.0.597.84-r72991) hung loading a simple web2py page. It couldn't even render the welcome page any more. Even a blank new profile didn't

[web2py] Bugfix for CheckboxesWidget

2011-01-30 Thread Bernd Rothert
This patch fixes the CheckboxesWidget as a replacement for the MultipleOptionsWidget in list:reference fields. list:reference fields use the IS_IN_DB(...,multiple=True) validator. Its options() method returns possible choices a list of string tuples (key, label) to be used in HTML option tags and

[web2py] Bugfix for Checkbox

2011-01-29 Thread Bernd Rothert
There is a small bug in web2py's HTML checkbox helper: from gluon.html import * print INPUT(_type='radio', _value=2, value='2']) input checked=checked type=radio value=2 / print INPUT(_type='checkbox', _value=2, value=['1', '2', '3']) input type=checkbox value=2 / print

[web2py] Bugfix for Checkbox

2011-01-29 Thread Bernd Rothert
There is a small bug in web2py's HTML checkbox helper: from gluon.html import * print INPUT(_type='radio', _value=2, value='2']) input checked=checked type=radio value=2 / print INPUT(_type='checkbox', _value=2, value=['1', '2', '3']) input type=checkbox value=2 / print

[web2py] Bugfix for full CRUD internal read links

2011-01-28 Thread Bernd Rothert
The book's example for full CRUD def data(): return (form=crud()) doesn't set the proper links from .../data/select/table to .../data/read/table/id they instead go to .../read/table/id This patch fixes the issue: --- a/gluon/tools.pyFri Jan 28 09:54:47 2011 -0600 +++

[web2py] Re: LIKE case sensitivity: Postgres differs to MySQL = DAL not portable

2011-01-28 Thread Bernd Rothert
On 28 Jan., 16:46, Thadeus Burgess thade...@thadeusb.com wrote: Case sensitive search is one of the benefits of using postgres instead of mysql! As Fran wrote case insensitive LIKE is just a default for MySQL and sqlite. MySQL supports case sensitive search: # SELECT * FROM person WHERE name

[web2py] Re: Callable as Field.default

2011-01-27 Thread Bernd Rothert
, BooleanField, ReferenceField,...). It could well remove the if cascades from represent(), parse() - seems like these are the hot spots. Of course this is not an easy thing to do and as I understand dal has just been redesigned. Cheers, Bernd On 26 Jan., 01:36, Bernd Rothert roth...@googlemail.com

[web2py] Re: Callable as Field.default

2011-01-27 Thread Bernd Rothert
unique uuids of course, so we need a function here. Some other functions like datetime.datetime.now and most probably others don't work the same way leading to inconsistent behaviour. Cheers, Bernd On Wed, Jan 26, 2011 at 1:36 AM, Bernd Rothert roth...@googlemail.comwrote: A table

[web2py] Callable as Field.default

2011-01-25 Thread Bernd Rothert
A table definition from the DAL chapter of the Web2py book: db.define_table('person', Field('uuid', length=64, default=uuid.uuid4()), Field('modified_on', 'datetime', default=now), Field('name'), format='%(name)s') now usually contains the current datetime from request.now and