[web2py] Re: IS_IN_DB no dropdown list

2011-04-03 Thread Kevin Cole
Ah. My misreading. You said "cookbook" and I read it as "book". I thought you were saying your examples in your book were out of date, which seemed odd. In the immortal words of Emily Litella, "Oh... Never mind..." [1] 1. http://en.wikipedia.org/wiki/Emily_Litella

[web2py] Re: IS_IN_DB no dropdown list

2011-04-03 Thread Anthony
The online version of the book is continually edited, so it will be more up-to-date than the printed copy. I doubt there's much (or anything) in the printed book that is out-of-date (i.e., no longer correct), particularly given that web2py maintains backward compatibility of the API. However, t

[web2py] Re: IS_IN_DB no dropdown list

2011-04-03 Thread Massimo Di Pierro
There is nothing really outdated in the 3rd edition of the book. There are a few typos (fixed online) and it missed a description of some of the new features (mostly new router, restful services). On Apr 3, 2:19 pm, Kevin Cole wrote: > Hi, > > Is there a nice place to figure out what's out of da

[web2py] Re: IS_IN_DB no dropdown list

2011-04-03 Thread Kevin Cole
Hi, Is there a nice place to figure out what's out of date in the book? (I recently bought a copy and was assuming it was a bit more up-to-date.) I'm just beginnings of web2py, having fought with and been defeated by other frameworks. ;-) Having beat my head against this very problem I had as

Re: [web2py] Re: IS_IN_DB no dropdown list

2011-02-14 Thread Rage Callao
On Fri, Feb 11, 2011 at 10:30 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > import datetime > now=datetime.date.today() > > > db=DAL('mysql://cookbook:cookb...@127.0.0.1/cookbook') > > db.define_table('category', >Field('name',length=32,notnull=True,unique=True), >

Re: [web2py] Re: IS_IN_DB no dropdown list

2011-02-11 Thread Bruno Rocha
2011/2/11 Anthony > On Friday, February 11, 2011 9:50:32 AM UTC-5, rochacbruno wrote: >> >> 2011/2/11 Massimo Di Pierro >> >> you can have >>> >>> requires=IS_IN_DB(,_and=IS_NOT_IN_DB(...)) >>> >> >> The above is a new syntax for me, is it on the book or somewhere? >> > > Yes, in the IS_IN_

Re: [web2py] Re: IS_IN_DB no dropdown list

2011-02-11 Thread Anthony
On Friday, February 11, 2011 9:50:32 AM UTC-5, rochacbruno wrote: > > 2011/2/11 Massimo Di Pierro > >> you can have >> >> requires=IS_IN_DB(,_and=IS_NOT_IN_DB(...)) >> > > The above is a new syntax for me, is it on the book or somewhere? > Yes, in the IS_IN_DB section here: http://web2py.c

Re: [web2py] Re: IS_IN_DB no dropdown list

2011-02-11 Thread Bruno Rocha
2011/2/11 Massimo Di Pierro > you can have > > requires=IS_IN_DB(,_and=IS_NOT_IN_DB(...)) > The above is a new syntax for me, is it on the book or somewhere?

[web2py] Re: IS_IN_DB no dropdown list

2011-02-11 Thread Massimo Di Pierro
you can have requires=IS_IN_DB(,_and=IS_NOT_IN_DB(...)) and/or requires=IS_IN_DB(db(condition),) Mind that the example in the cookbook 3 years old. It works but now you do not all those validators. They are set by default: import datetime now=datetime.date.today() db=DAL('mysql://cook